Skip to content

Instantly share code, notes, and snippets.

@jaredlewis
Created May 21, 2013 17:36
Show Gist options
  • Save jaredlewis/5621666 to your computer and use it in GitHub Desktop.
Save jaredlewis/5621666 to your computer and use it in GitHub Desktop.
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.signals.SignalDebugPanel',
# 'debug_toolbar.panels.logger.LoggingPanel',
)
def show_debug_toolbar(request):
if request.user.is_staff:
return True
return False
DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False,
'SHOW_TOOLBAR_CALLBACK': show_debug_toolbar,
'HIDE_DJANGO_SQL': False,
'ENABLE_STACKTRACES' : True,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment