aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/utils/settings.py
diff options
context:
space:
mode:
authorAymeric Augustin2013-10-27 12:48:44 +0100
committerAymeric Augustin2013-10-27 12:48:44 +0100
commit9cb9796791062c9d208c0f887dc65142d42c022a (patch)
tree40ba69bec7f39115ccfcc88c5b1cfa2baf2f86ea /debug_toolbar/utils/settings.py
parentc710140a15222af2cf31b7579c6a5fedf9a482d5 (diff)
downloaddjango-debug-toolbar-9cb9796791062c9d208c0f887dc65142d42c022a.tar.bz2
Centralize access to config and default values.
Diffstat (limited to 'debug_toolbar/utils/settings.py')
-rw-r--r--debug_toolbar/utils/settings.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/debug_toolbar/utils/settings.py b/debug_toolbar/utils/settings.py
new file mode 100644
index 0000000..482781b
--- /dev/null
+++ b/debug_toolbar/utils/settings.py
@@ -0,0 +1,27 @@
+from __future__ import unicode_literals
+
+from django.conf import settings
+from django.utils import six
+
+
+CONFIG_DEFAULTS = {
+ 'INTERCEPT_REDIRECTS': False,
+ 'SHOW_TOOLBAR_CALLBACK': None,
+ 'EXTRA_SIGNALS': [],
+ 'HIDE_DJANGO_SQL': True,
+ 'SHOW_TEMPLATE_CONTEXT': True,
+ 'TAG': 'body',
+ 'ENABLE_STACKTRACES': True,
+ 'HIDDEN_STACKTRACE_MODULES': (
+ 'socketserver' if six.PY3 else 'SocketServer',
+ 'threading',
+ 'wsgiref',
+ 'debug_toolbar',
+ ),
+ 'ROOT_TAG_ATTRS': '',
+}
+
+
+CONFIG = {}
+CONFIG.update(CONFIG_DEFAULTS)
+CONFIG.update(getattr(settings, 'DEBUG_TOOLBAR_CONFIG', {}))