From a9134faef721f0166f25b0ae717ab96e4c3a4a40 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sun, 9 Mar 2014 21:50:41 +0100 Subject: Document DISABLE_PANELS. --- debug_toolbar/panels/__init__.py | 2 +- debug_toolbar/settings.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'debug_toolbar') diff --git a/debug_toolbar/panels/__init__.py b/debug_toolbar/panels/__init__.py index a7e3528..74b0734 100644 --- a/debug_toolbar/panels/__init__.py +++ b/debug_toolbar/panels/__init__.py @@ -24,7 +24,7 @@ class Panel(object): @property def enabled(self): # Check to see if settings has a default value for it - if get_name_from_obj(self) in dt_settings.CONFIG['DEFAULT_DISABLED_PANELS']: + if get_name_from_obj(self) in dt_settings.CONFIG['DISABLE_PANELS']: default = 'off' else: default = 'on' diff --git a/debug_toolbar/settings.py b/debug_toolbar/settings.py index 2c71888..9ec2736 100644 --- a/debug_toolbar/settings.py +++ b/debug_toolbar/settings.py @@ -16,7 +16,7 @@ from django.utils import six CONFIG_DEFAULTS = { # Toolbar options - 'DEFAULT_DISABLED_PANELS': set(['debug_toolbar.panels.redirects.RedirectsPanel']), + 'DISABLE_PANELS': set(['debug_toolbar.panels.redirects.RedirectsPanel']), 'INSERT_BEFORE': '', 'RENDER_PANELS': None, 'RESULTS_STORE_SIZE': 10, @@ -128,23 +128,23 @@ else: if 'INTERCEPT_REDIRECTS' in USER_CONFIG: warnings.warn( "INTERCEPT_REDIRECTS is deprecated. Please use the " - "DEFAULT_DISABLED_PANELS config in the" + "DISABLE_PANELS config in the" "DEBUG_TOOLBAR_CONFIG setting.", DeprecationWarning) if USER_CONFIG['INTERCEPT_REDIRECTS']: if 'debug_toolbar.panels.redirects.RedirectsPanel' \ - in CONFIG['DEFAULT_DISABLED_PANELS']: + in CONFIG['DISABLE_PANELS']: # RedirectsPanel should be enabled try: - CONFIG['DEFAULT_DISABLED_PANELS'].remove( + CONFIG['DISABLE_PANELS'].remove( 'debug_toolbar.panels.redirects.RedirectsPanel' ) except KeyError: # We wanted to remove it, but it didn't exist. This is fine pass elif not 'debug_toolbar.panels.redirects.RedirectsPanel' \ - in CONFIG['DEFAULT_DISABLED_PANELS']: + in CONFIG['DISABLE_PANELS']: # RedirectsPanel should be disabled - CONFIG['DEFAULT_DISABLED_PANELS'].add( + CONFIG['DISABLE_PANELS'].add( 'debug_toolbar.panels.redirects.RedirectsPanel' ) -- cgit v1.2.3