]> git.0d.be Git - panikweb.git/commitdiff
make it possible for local settings to add debug panels
authorFrédéric Péters <fpeters@0d.be>
Thu, 12 Sep 2013 12:15:14 +0000 (14:15 +0200)
committerFrédéric Péters <fpeters@0d.be>
Thu, 12 Sep 2013 12:15:14 +0000 (14:15 +0200)
panikweb/settings.py

index d2522bf78004237ab5a610608a01c47bd88f4db1..3444f8f88a1f68c13cc4898485a63b713e0026d6 100644 (file)
@@ -199,6 +199,18 @@ LOGGING = {
 
 STATSD_CLIENT = 'django_statsd.clients.null'
 
+DEBUG_TOOLBAR_PANELS = (
+    'debug_toolbar.panels.version.VersionDebugPanel',
+    'debug_toolbar.panels.timer.TimerDebugPanel',
+    'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
+    'debug_toolbar.panels.headers.HeaderDebugPanel',
+    'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
+    'debug_toolbar.panels.sql.SQLDebugPanel',
+    'debug_toolbar.panels.template.TemplateDebugPanel',
+    'debug_toolbar.panels.signals.SignalDebugPanel',
+    'debug_toolbar.panels.logger.LoggingPanel',
+)
+
 try:
     from local_settings import *
 except ImportError, e:
@@ -215,6 +227,9 @@ if DEBUG and DEBUG_TOOLBAR:
         'INTERCEPT_REDIRECTS': False,
     }
 
+    if 'template_timings_panel.panels.TemplateTimings.TemplateTimings' in DEBUG_TOOLBAR_PANELS:
+        INSTALLED_APPS += ('template_timings_panel',)
+
 if ENABLE_PIWIK is False:
     MIDDLEWARE_CLASSES = tuple([x for x in MIDDLEWARE_CLASSES \
                                 if x != 'panikweb.middleware.StripPiwikCookieMiddleware'])