Created
September 11, 2013 15:47
-
-
Save benspaulding/6525540 to your computer and use it in GitHub Desktop.
This file contains 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
# Set internal IPs if necessary, for use with debug toolbar. | |
try: | |
INTERNAL_IPS | |
except NameError: | |
INTERNAL_IPS = [] | |
INTERNAL_IPS = list(INTERNAL_IPS) + ['127.0.0.1'] | |
# Install and setup debug toolbar if it is available. | |
try: | |
__import__('debug_toolbar') | |
except ImportError: | |
pass | |
else: | |
if 'debug_toolbar' not in INSTALLED_APPS: | |
INSTALLED_APPS = list(INSTALLED_APPS) + ['debug_toolbar'] | |
MIDDLEWARE_CLASSES = list(MIDDLEWARE_CLASSES) + \ | |
['debug_toolbar.middleware.DebugToolbarMiddleware'] | |
DEBUG_TOOLBAR_CONFIG = { | |
'INTERCEPT_REDIRECTS': False, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment