A configurable set of panels that display various debug information about the current request/response.

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 module

There is also one Django management command currently:

  • debugsqlshell: Outputs the SQL that gets executed as you work in the Python interactive shell.

1.)  Install the django debug toolbar with easy install 

E:\>cd python

E:\python>cd Scripts

E:\python\Scripts>easy_install.exe django-debug-toolbar

Searching for django-debug-toolbar

Reading http://pypi.python.org/simple/django-debug-toolbar/

Reading http://robhudson.github.com/django-debug-toolbar/

Reading http://github.com/robhudson/django-debug-toolbar/downloads

Reading http://rob.cogit8.org/blog/2008/Sep/19/introducing-django-debug-toolbar/

Best match: django-debug-toolbar 0.8.5

Downloading http://pypi.python.org/packages/source/d/django-debug-toolbar/django-debug-toolbar-0.8.5.tar.gz#md5=0815d5071bb0628b

85e9915007e053

Processing django-debug-toolbar-0.8.5.tar.gz

Running django-debug-toolbar-0.8.5\setup.py -q bdist_egg –dist-dir c:\docume~1\maheshp\locals~1\temp\easy_install-e1thej\django

ebug-toolbar-0.8.5\egg-dist-tmp-zt7aws

Adding django-debug-toolbar 0.8.5 to easy-install.pth file

Installed e:\python\lib\site-packages\django_debug_toolbar-0.8.5-py2.7.egg

Processing dependencies for django-debug-toolbar

Finished processing dependencies for django-debug-toolbar

E:\python\Scripts>

2.) Change in setting

A.)

Add the following middleware to your project’s settings.py file:

‘debug_toolbar.middleware.DebugToolbarMiddleware’,

B.)

Make sure your IP is listed in the INTERNAL_IPS setting. If you are working locally this will be:

INTERNAL_IPS = (‘127.0.0.1’,)

C.)

Add debug_toolbar to your INSTALLED_APPS setting so Django can find the template files associated with the Debug Toolbar.

‘debug_toolbar’,

3.) More information:

http://pypi.python.org/pypi/django-debug-toolbar/

http://packages.python.org/distribute/easy_install.html

http://pypi.python.org/pypi/setuptools

Advertisements