From c93f3c56b1fb43573bd47d9baa8e79a61e9bb661 Mon Sep 17 00:00:00 2001 From: benjaoming Date: Sun, 27 Jan 2013 03:27:54 +0100 Subject: [PATCH] add debug_toolbar if installed --- testproject/testproject/settings.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/testproject/testproject/settings.py b/testproject/testproject/settings.py index 23af7d00..bf08e3c5 100644 --- a/testproject/testproject/settings.py +++ b/testproject/testproject/settings.py @@ -149,3 +149,14 @@ WIKI_ANONYMOUS_CREATE = False LOGIN_REDIRECT_URL = "/" from settings_local import * + +try: + import debug_toolbar #@UnusedImport + MIDDLEWARE_CLASSES = list(MIDDLEWARE_CLASSES) + [ + 'debug_toolbar.middleware.DebugToolbarMiddleware', + ] + INSTALLED_APPS = list(INSTALLED_APPS) + ['debug_toolbar'] + INTERNAL_IPS = ('127.0.0.1',) + DEBUG_TOOLBAR_CONFIG = {'INTERCEPT_REDIRECTS': False} +except ImportError: + pass -- 2.45.2