Mercurial > public > bravenewsurf
comparison bns_website/settings/local.py @ 11:d5f3bb516fd3
For issue #4, add support for the Django Debug Toolbar if in debug mode.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 30 Oct 2011 14:51:12 -0500 |
parents | 48ff23eab86a |
children |
comparison
equal
deleted
inserted
replaced
10:01740aa4a6b9 | 11:d5f3bb516fd3 |
---|---|
60 'root': { | 60 'root': { |
61 'level': 'DEBUG', | 61 'level': 'DEBUG', |
62 'handlers': ['file'], | 62 'handlers': ['file'], |
63 }, | 63 }, |
64 } | 64 } |
65 | |
66 # Django Debug Toolbar support | |
67 if DEBUG: | |
68 try: | |
69 import debug_toolbar | |
70 except ImportError: | |
71 pass | |
72 else: | |
73 i = MIDDLEWARE_CLASSES.index('django.middleware.common.CommonMiddleware') | |
74 MIDDLEWARE_CLASSES.insert(i + 1, | |
75 'debug_toolbar.middleware.DebugToolbarMiddleware') | |
76 INTERNAL_IPS = ['127.0.0.1'] | |
77 INSTALLED_APPS.append('debug_toolbar') |