# HG changeset patch # User Brian Neal # Date 1320004272 18000 # Node ID d5f3bb516fd362b529693c34ee8b97c37e109f71 # Parent 01740aa4a6b992b75483968041eded05562748a9 For issue #4, add support for the Django Debug Toolbar if in debug mode. diff -r 01740aa4a6b9 -r d5f3bb516fd3 bns_website/settings/local.py --- a/bns_website/settings/local.py Sat Oct 29 22:38:18 2011 -0500 +++ b/bns_website/settings/local.py Sun Oct 30 14:51:12 2011 -0500 @@ -62,3 +62,16 @@ 'handlers': ['file'], }, } + +# Django Debug Toolbar support +if DEBUG: + try: + import debug_toolbar + except ImportError: + pass + else: + i = MIDDLEWARE_CLASSES.index('django.middleware.common.CommonMiddleware') + MIDDLEWARE_CLASSES.insert(i + 1, + 'debug_toolbar.middleware.DebugToolbarMiddleware') + INTERNAL_IPS = ['127.0.0.1'] + INSTALLED_APPS.append('debug_toolbar')