Permalink
Browse files

Document DISABLE_PANELS.

  • Loading branch information...
aaugustin committed Mar 9, 2014
1 parent 88712cf commit a9134faef721f0166f25b0ae717ab96e4c3a4a40
Showing with 9 additions and 18 deletions.
  1. +1 −1 debug_toolbar/panels/__init__.py
  2. +6 −6 debug_toolbar/settings.py
  3. +1 −10 docs/configuration.rst
  4. +1 −1 docs/panels.rst
@@ -24,7 +24,7 @@ def panel_id(self):
@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'
View
@@ -16,7 +16,7 @@
CONFIG_DEFAULTS = {
# Toolbar options
- 'DEFAULT_DISABLED_PANELS': set(['debug_toolbar.panels.redirects.RedirectsPanel']),
+ 'DISABLE_PANELS': set(['debug_toolbar.panels.redirects.RedirectsPanel']),
'INSERT_BEFORE': '</body>',
'RENDER_PANELS': None,
'RESULTS_STORE_SIZE': 10,
@@ -128,23 +128,23 @@
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'
)
View
@@ -57,7 +57,7 @@ toolbar itself, others are specific to some panels.
Toolbar options
~~~~~~~~~~~~~~~
-* ``DEFAULT_DISABLED_PANELS``
+* ``DISABLE_PANELS``
Default: ``set(['debug_toolbar.panels.redirects.RedirectsPanel'])``
@@ -149,14 +149,6 @@ Panel options
Useful for eliminating server-related entries which can result
in enormous DOM structures and toolbar rendering delays.
-* ``INTERCEPT_REDIRECTS``
-
- Default: ``False``
-
- Panel: redirects
-
- If set to ``True``, the redirect panel will be active by default.
-
* ``SHOW_TEMPLATE_CONTEXT``
Default: ``True``
@@ -185,6 +177,5 @@ Here's what a slightly customized toolbar configuration might look like::
'RESULTS_STORE_SIZE': 3,
'SHOW_COLLAPSED': True,
# Panel options
- 'INTERCEPT_REDIRECTS': True,
'SQL_WARNING_THRESHOLD': 100, # milliseconds
}
View
@@ -103,7 +103,7 @@ ready.
Since this behavior is annoying when you aren't debugging a redirect, this
panel is included but inactive by default. You can activate it by default with
-the ``INTERCEPT_REDIRECTS`` configuration option.
+the ``DISABLE_PANELS`` configuration option.
Non-default built-in panels

0 comments on commit a9134fa

Please sign in to comment.