Skip to main content

sql console is an app which allows for the execution of sql queries in the admin section of django.

Project description

Django SQL Console

Sqlconsole is a django app that allows for the execution of sql queries from the admin section of a django site. An appropriate use case is when you don't have access to the database especially in a production environment.

SqlConsole is really meant to be used for database read queries eg:

SELECT * FROM <some_table>

SELECT count(*) FROM <some_table>

For queries that modify data eg:

DELETE FROM <some_table> WHERE ID=<some_id>

only a success or error message will be shown

Install

pip install django-sqlconsole

Add the app to INSTALLED_APPS

INSTALLED_APPS = [
...
'sqlconsole'
]

SqlConsole will be included in the admin section with a history of executed queries.

Permissions will be required to execute queries sqlconsole.can_execute_query

Screenshot

Example Query

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-sqlconsole-1.3.tar.gz (6.5 kB view hashes)

Uploaded Source

Built Distribution

django_sqlconsole-1.3-py2.py3-none-any.whl (8.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page