Skip to main content

Your project description goes here

Project description

https://badge.fury.io/py/django-simple-sql-debug.svg https://travis-ci.org/pylame22/django-simple-sql-debug.svg?branch=master https://codecov.io/gh/pylame22/django-simple-sql-debug/branch/master/graph/badge.svg

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

demo-list.png demo-detail.png

Credits

Tools used in rendering this package:

History

0.1.0 (2019-07-30)

  • First release on PyPI.

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-simple-sql-debug-0.2.1.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

django_simple_sql_debug-0.2.1-py2.py3-none-any.whl (18.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-simple-sql-debug-0.2.1.tar.gz.

File metadata

  • Download URL: django-simple-sql-debug-0.2.1.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for django-simple-sql-debug-0.2.1.tar.gz
Algorithm Hash digest
SHA256 73db2ffe793c4e2e5ac8bb181fc447aa21039e34ed14d41bf5539ebe45b95326
MD5 ba305c5dd18a650d63ce87cb88d03952
BLAKE2b-256 234931da5aedd4186cb0afd3ef5d250c4b52446491b9dec43b827536486e93fd

See more details on using hashes here.

File details

Details for the file django_simple_sql_debug-0.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: django_simple_sql_debug-0.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for django_simple_sql_debug-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6ecda01f01622cb13d4a470774e6cb937055987e85a8abd63e509466b37190dd
MD5 8593fe44f9cf54320a7b8e7233d4f40a
BLAKE2b-256 fdef18f1f86c22f0451012b1d9e6f9380a57fbec20a67cd0e1b0a83b6f2475de

See more details on using hashes here.

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