aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/panels/cache.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/panels/cache.py
parentc710140a15222af2cf31b7579c6a5fedf9a482d5 (diff)
downloaddjango-debug-toolbar-9cb9796791062c9d208c0f887dc65142d42c022a.tar.bz2
Centralize access to config and default values.
Diffstat (limited to 'debug_toolbar/panels/cache.py')
-rw-r--r--debug_toolbar/panels/cache.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/debug_toolbar/panels/cache.py b/debug_toolbar/panels/cache.py
index b3cb540..8127d55 100644
--- a/debug_toolbar/panels/cache.py
+++ b/debug_toolbar/panels/cache.py
@@ -16,6 +16,7 @@ from django.utils.translation import ugettext_lazy as _, ungettext
from debug_toolbar.panels import DebugPanel
from debug_toolbar.utils import (tidy_stacktrace, render_stacktrace,
get_template_info, get_stack)
+from debug_toolbar.utils.settings import CONFIG
cache_called = Signal(providing_args=[
@@ -28,9 +29,7 @@ def send_signal(method):
value = method(self, *args, **kwargs)
t = time.time() - t
- debug_toolbar_config = getattr(settings, 'DEBUG_TOOLBAR_CONFIG', {})
- enable_stacktraces = debug_toolbar_config.get('ENABLE_STACKTRACES', True)
- if enable_stacktraces:
+ if CONFIG['ENABLE_STACKTRACES']:
stacktrace = tidy_stacktrace(reversed(get_stack()))
else:
stacktrace = []