Skip to content

Instantly share code, notes, and snippets.

Created April 11, 2012 02:03
Show Gist options
  • Save anonymous/2356341 to your computer and use it in GitHub Desktop.
Save anonymous/2356341 to your computer and use it in GitHub Desktop.
django-debug-toolbar
## file: dtb.py
import settings
settings.MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',)
settings.INSTALLED_APPS += ('debug_toolbar',)
INTERNAL_IPS = ('127.0.0.1',)
DEBUG_TOOLBAR_PANELS = (
#'debug_toolbar.panels.version.VersionDebugPanel', #
'debug_toolbar.panels.timer.TimerDebugPanel',
'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
'debug_toolbar.panels.headers.HeaderDebugPanel',
'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
'debug_toolbar.panels.template.TemplateDebugPanel',
'debug_toolbar.panels.sql.SQLDebugPanel',
#'debug_toolbar.panels.cache.CacheDebugPanel',
#'debug_toolbar.panels.logger.LoggingPanel',
)
DEBUG_TOOLBAR_CONFIG = {
'EXCLUDE_URLS': ('/admin',), #
'INTERCEPT_REDIRECTS': False,
}
## in settings.py add lines
if DEBUG:
from dtb import *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment