https://github.com/eventbrite/django-debug-toolbar
A configurable set of panels that display various debug information about the current request/response.
https://github.com/eventbrite/django-debug-toolbar
Last synced: 3 months ago
JSON representation
A configurable set of panels that display various debug information about the current request/response.
- Host: GitHub
- URL: https://github.com/eventbrite/django-debug-toolbar
- Owner: eventbrite
- License: bsd-3-clause
- Created: 2011-05-21T00:25:42.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2023-05-17T19:06:44.000Z (about 2 years ago)
- Last Synced: 2023-05-17T19:27:53.608Z (about 2 years ago)
- Language: Python
- Homepage: https://github.com/django-debug-toolbar/django-debug-toolbar
- Size: 1.59 MB
- Stars: 0
- Watchers: 16
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
====================
Django Debug Toolbar
====================The Django Debug Toolbar is a configurable set of panels that display various
debug information about the current request/response and when clicked, display
more details about the panel's content.Currently, the following panels have been written and are working:
- Django version
- Request timer
- A list of settings in settings.py
- Common HTTP headers
- GET/POST/cookie/session variable display
- Templates and context used, and their template paths
- SQL queries including time to execute and links to EXPLAIN each query
- List of signals, their args and receivers
- Logging output via Python's built-in logging, or via the `logbook `_ moduleThere is also one Django management command currently:
- `debugsqlshell`: Outputs the SQL that gets executed as you work in the Python
interactive shell. (See example below)If you have ideas for other panels please let us know.
* Note: The Debug Toolbar only works on Django 1.1 and newer.
Installation
============#. Add the `debug_toolbar` directory to your Python path.
#. Add the following middleware to your project's `settings.py` file:
``'debug_toolbar.middleware.DebugToolbarMiddleware',``
Tying into middleware allows each panel to be instantiated on request and
rendering to happen on response.The order of MIDDLEWARE_CLASSES is important: the Debug Toolbar middleware
must come after any other middleware that encodes the response's content
(such as GZipMiddleware).Note: The debug toolbar will only display itself if the mimetype of the
response is either `text/html` or `application/xhtml+xml` and contains a
closing `