aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/toolbar/loader.py
diff options
context:
space:
mode:
authorRob Hudson2008-09-16 07:00:29 -0700
committerRob Hudson2008-09-16 07:00:29 -0700
commit96ca83db5686f5b8983e7b008a698307130e58c9 (patch)
tree7dcce0b3865e3599e5e58599a8bef799b2370e3f /debug_toolbar/toolbar/loader.py
parent4591e34f0140c43e68e4ecd97eae7f3ea05878f6 (diff)
parent5fd534e68dbd191c5d6062a39ae512b109cccbdb (diff)
downloaddjango-debug-toolbar-96ca83db5686f5b8983e7b008a698307130e58c9.tar.bz2
Merge branch 'master' into explain and updating a few bits to work with the new
urls and views.
Diffstat (limited to 'debug_toolbar/toolbar/loader.py')
-rw-r--r--debug_toolbar/toolbar/loader.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/debug_toolbar/toolbar/loader.py b/debug_toolbar/toolbar/loader.py
index 815c7f3..67dcc3e 100644
--- a/debug_toolbar/toolbar/loader.py
+++ b/debug_toolbar/toolbar/loader.py
@@ -10,15 +10,29 @@ class DebugToolbar(object):
self.panels = []
self.panel_list = []
self.content_list = []
+ # Override this tuple by copying to settings.py as `DEBUG_TOOLBAR_PANELS`
+ self.default_panels = (
+ 'debug_toolbar.panels.version.VersionDebugPanel',
+ 'debug_toolbar.panels.timer.TimerDebugPanel',
+ 'debug_toolbar.panels.headers.HeaderDebugPanel',
+ 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
+ 'debug_toolbar.panels.sql.SQLDebugPanel',
+ 'debug_toolbar.panels.cache.CacheDebugPanel',
+ 'debug_toolbar.panels.template.TemplateDebugPanel',
+ )
def load_panels(self):
"""
- Populate debug panel lists from settings.DEBUG_TOOLBAR_PANELS.
+ Populate debug panels
"""
from django.conf import settings
from django.core import exceptions
- for panel_path in settings.DEBUG_TOOLBAR_PANELS:
+ # Check if settings has a DEBUG_TOOLBAR_PANELS, otherwise use default
+ if hasattr(settings, 'DEBUG_TOOLBAR_PANELS'):
+ self.default_panels = settings.DEBUG_TOOLBAR_PANELS
+
+ for panel_path in self.default_panels:
try:
dot = panel_path.rindex('.')
except ValueError: