From: Matthijs Kooijman Date: Tue, 19 Oct 2010 09:00:04 +0000 (+0200) Subject: settings: Enable de Django debug toolbar. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=d7339cf04fb6279fae24313d672a52d8b95fbbec;p=matthijs%2Fprojects%2Fdorestad-bookings.git settings: Enable de Django debug toolbar. This toolbar is enabled when DEBUG is on and the client ip is in INTERNAL_IPS. --- diff --git a/localsettings.py.tmpl b/localsettings.py.tmpl index 58a4544..967e550 100644 --- a/localsettings.py.tmpl +++ b/localsettings.py.tmpl @@ -4,3 +4,6 @@ # For example, enable debugging by commenting in the following lines. #DEBUG = True #TEMPLATE_DEBUG = True + +# Show extra debug info to Matthijs' IP (debug_toolbar also needs this) +#INTERNAL_IPS=("82.169.104.215",) diff --git a/settings.py b/settings.py index 91b6996..86c98d0 100644 --- a/settings.py +++ b/settings.py @@ -64,6 +64,7 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', + 'debug_toolbar.middleware.DebugToolbarMiddleware', ) ROOT_URLCONF = 'dorestad-bookings.urls' @@ -84,6 +85,7 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.admin', 'tickets', + 'debug_toolbar', ) TEMPLATE_CONTEXT_PROCESSORS = (