Your project description goes here
Project description
This application shows the database queries
Installation
Install sql_debug:
pip install django-simple-sql-debug
Add it to your INSTALLED_APPS:
INSTALLED_APPS = [
...
'sql_debug',
...
]
Add sql_debug’s URL patterns:
from sql_debug import urls as sql_debug_urls
urlpatterns = [
...
path('sql_debug/', include(sql_debug_urls)),
...
]
Run migrate:
python manage.py migrate
Settings
SQL_DEBUG_PATHS_BLACKLIST = [
'/sql_debug',
'/admin',
'/favicon.ico',
] # by default
SQL_DEBUG_MAX_REQUESTS = 20 # by default
- SQL_DEBUG_BLACKLISTED_PATHS
A list of paths that are skipped by the application.
- SQL_DEBUG_MAX_REQUESTS
Maximum number of queries stored in the database.
Production
Add in production_settings.py
# Remove django-sql-debug
INSTALLED_APPS.remove('sql_debug')
MIDDLEWARE.remove('sql_debug.middleware.SqlDebugMiddleware')
Add in urls.py
if settings.ENV == 'local': # or (not settings.DEBUG)
urlpatterns += [
path('sql_debug/', include(sql_debug_urls)),
]
Screenshots
Credits
Tools used in rendering this package:
History
0.1.0 (2019-07-30)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-simple-sql-debug-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73db2ffe793c4e2e5ac8bb181fc447aa21039e34ed14d41bf5539ebe45b95326 |
|
MD5 | ba305c5dd18a650d63ce87cb88d03952 |
|
BLAKE2b-256 | 234931da5aedd4186cb0afd3ef5d250c4b52446491b9dec43b827536486e93fd |
Close
Hashes for django_simple_sql_debug-0.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ecda01f01622cb13d4a470774e6cb937055987e85a8abd63e509466b37190dd |
|
MD5 | 8593fe44f9cf54320a7b8e7233d4f40a |
|
BLAKE2b-256 | fdef18f1f86c22f0451012b1d9e6f9380a57fbec20a67cd0e1b0a83b6f2475de |