aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/panels/template.py
diff options
context:
space:
mode:
Diffstat (limited to 'debug_toolbar/panels/template.py')
-rw-r--r--debug_toolbar/panels/template.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/debug_toolbar/panels/template.py b/debug_toolbar/panels/template.py
index bda6630..e08f220 100644
--- a/debug_toolbar/panels/template.py
+++ b/debug_toolbar/panels/template.py
@@ -5,6 +5,8 @@ from django.template.loader import render_to_string
from django.test.signals import template_rendered
from debug_toolbar.panels import DebugPanel
+from pprint import pformat
+
# Code taken and adapted from Simon Willison and Django Snippets:
# http://www.djangosnippets.org/snippets/766/
@@ -60,7 +62,7 @@ class TemplateDebugPanel(DebugPanel):
info['template'] = t
# Clean up context for better readability
c = d.get('context', None)
- info['context'] = '\n'.join([_d.__repr__() for _d in c.dicts])
+ info['context'] = '\n'.join([pformat(_d) for _d in c.dicts])
template_context.append(info)
context = {
'templates': template_context,