From d7339cf04fb6279fae24313d672a52d8b95fbbec Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 19 Oct 2010 11:00:04 +0200 Subject: [PATCH] settings: Enable de Django debug toolbar. This toolbar is enabled when DEBUG is on and the client ip is in INTERNAL_IPS. --- localsettings.py.tmpl | 3 +++ settings.py | 2 ++ 2 files changed, 5 insertions(+) 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 = ( -- 2.30.2