Django debug toolbar FTW.

30.01.2009 12:08

posted by: Benjamin Smith

Posted Under: , , ,

If you do any development with Django, then this is a must have.

Not only is it awesomely useful, but it also has a great abbreviation that could be a throwback to WWF days of old. Any child of the mid-to-late 80’s remember the DDT?! That’s kind of what this is does, help you drive problems with your app head first into the mat - nice.

Google code page here: DDT on google code

Github here: DDT on github

Like any other python package, this one is simple to install.

Get a tarball, unpack it, cd into it..

# python setup.py build
# sudo python setup.py install

Now, use it in your django app by adding something similar to your settings.py:

# This should be appended to MIDDLEWARE_CLASSES:
'debug_toolbar.middleware.DebugToolbarMiddleware',

# This should be appended to INSTALLED_APPS:
'debug_toolbar',

# Set this to localhost if developing locally
# If not developing locally, add your remote IP..
INTERNAL_IPS = ('127.0.0.1')

# Various apps available
DEBUG_TOOLBAR_PANELS = (
    'debug_toolbar.panels.version.VersionDebugPanel',
    'debug_toolbar.panels.timer.TimerDebugPanel',
    'debug_toolbar.panels.headers.HeaderDebugPanel',
    'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
    'debug_toolbar.panels.sql.SQLDebugPanel',
    'debug_toolbar.panels.cache.CacheDebugPanel',
    'debug_toolbar.panels.logger.LoggingPanel',
)

See here: README for more detail on usage/install.

Get it, use it, love it.

EDIT: Added some quick bits on how to install/use

2 comments | 1 pingback
Add post to: Delicious Reddit Slashdot Digg Technorati Google
Comment

Pingbacks

Pages tagged "toolbar" @www.blogbookmarker.com 11.02.2009 19:18
saved by 2 others     nicbh bookmarked on 02/11/09 | just-another.net     ShareASale Blog » Blog Archive » ShareASale and … saved by 2 others     nicbh bookmarked on 02/11/09 | blog.shareasale.com     Google Toolbar Give us Chrome’s

Comments

jan berger 31.01.2009 18:27

great hint. thanks for sharing!

reply
Philip Reynolds 28.02.2010 7:37

Preference is to use pip:

pip install django-debug-toolbar

reply

Comment form for «Django debug toolbar FTW.»

Required. 30 chars of fewer.

Required.

captcha image Please, enter symbols, which you see on the image