Created
December 21, 2010 08:45
-
-
Save chrisglass/749672 to your computer and use it in GitHub Desktop.
A magic snippet to paste in your personal.py configuration, and the debug toolbar is only enabled for superusers that pass ?debug in the url!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def show_toolbar(request): | |
return request.user.is_superuser and 'debug' in request.GET | |
DEBUG_TOOLBAR_CONFIG = { | |
'SHOW_TOOLBAR_CALLBACK': show_toolbar, | |
'MEDIA_URL': '/media/debug_toolbar/', | |
'INTERCEPT_REDIRECTS': False, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment