diff options
Diffstat (limited to 'debug_toolbar/utils/settings.py')
| -rw-r--r-- | debug_toolbar/utils/settings.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/debug_toolbar/utils/settings.py b/debug_toolbar/utils/settings.py index 12dc231..45f661f 100644 --- a/debug_toolbar/utils/settings.py +++ b/debug_toolbar/utils/settings.py @@ -4,6 +4,13 @@ from django.conf import settings from django.utils import six +# Always import this module as follows: +# from debug_toolbar.utils import settings [as dt_settings] + +# Don't import directly CONFIG or PANELs, or you will miss changes performed +# with override_settings in tests. + + CONFIG_DEFAULTS = { 'INTERCEPT_REDIRECTS': False, 'SHOW_TOOLBAR_CALLBACK': None, @@ -27,3 +34,20 @@ CONFIG_DEFAULTS = { CONFIG = {} CONFIG.update(CONFIG_DEFAULTS) CONFIG.update(getattr(settings, 'DEBUG_TOOLBAR_CONFIG', {})) + + +PANELS_DEFAULTS = ( + '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.cache.CacheDebugPanel', + 'debug_toolbar.panels.signals.SignalDebugPanel', + 'debug_toolbar.panels.logger.LoggingPanel', +) + + +PANELS = getattr(settings, 'DEBUG_TOOLBAR_PANELS', PANELS_DEFAULTS) |
