aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/panels/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'debug_toolbar/panels/__init__.py')
-rw-r--r--debug_toolbar/panels/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/debug_toolbar/panels/__init__.py b/debug_toolbar/panels/__init__.py
index 47ca996..d64aac2 100644
--- a/debug_toolbar/panels/__init__.py
+++ b/debug_toolbar/panels/__init__.py
@@ -14,9 +14,6 @@ class DebugPanel(object):
# If content returns something, set to True in subclass
has_content = False
- # This can be set to False in instances if the panel is disabled.
- enabled = True
-
# We'll maintain a local context instance so we can expose our template
# context variables to panels which need them:
context = {}
@@ -37,6 +34,9 @@ class DebugPanel(object):
def dom_id(self):
return 'djDebug%sPanel' % (self.name.replace(' ', ''))
+ def enabled(self):
+ return self.toolbar.request.COOKIES.get(self.dom_id(), 'on') == 'on'
+
# URLs for panel-specific views
@classmethod