aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/panels/template.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/template.py
parentc710140a15222af2cf31b7579c6a5fedf9a482d5 (diff)
downloaddjango-debug-toolbar-9cb9796791062c9d208c0f887dc65142d42c022a.tar.bz2
Centralize access to config and default values.
Diffstat (limited to 'debug_toolbar/panels/template.py')
-rw-r--r--debug_toolbar/panels/template.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/debug_toolbar/panels/template.py b/debug_toolbar/panels/template.py
index d8f96f2..f8cd46b 100644
--- a/debug_toolbar/panels/template.py
+++ b/debug_toolbar/panels/template.py
@@ -12,6 +12,7 @@ from django.utils.translation import ugettext_lazy as _
from django.db.models.query import QuerySet, RawQuerySet
from debug_toolbar.panels import DebugPanel
from debug_toolbar.utils.tracking.db import recording, SQLQueryTriggered
+from debug_toolbar.utils.settings import CONFIG
# Code taken and adapted from Simon Willison and Django Snippets:
# http://www.djangosnippets.org/snippets/766/
@@ -133,7 +134,7 @@ class TemplateDebugPanel(DebugPanel):
template.origin_name = 'No origin'
info['template'] = template
# Clean up context for better readability
- if getattr(settings, 'DEBUG_TOOLBAR_CONFIG', {}).get('SHOW_TEMPLATE_CONTEXT', True):
+ if CONFIG['SHOW_TEMPLATE_CONTEXT']:
context_list = template_data.get('context', [])
info['context'] = '\n'.join(context_list)
template_context.append(info)