diff options
| author | Rob Hudson | 2008-09-20 15:40:09 -0700 |
|---|---|---|
| committer | Rob Hudson | 2008-09-20 15:40:09 -0700 |
| commit | b9bd4c0cb9aa595c2648d43fce49961139f46971 (patch) | |
| tree | c993d41129f1e396e7bf3390802744d28ed8c5fd /debug_toolbar | |
| parent | d85426c65e906d721e6b656ea9d7d53052c8a6bc (diff) | |
| parent | 8e124b0a129ab351ec6cae30d8358709d4c1430b (diff) | |
| download | django-debug-toolbar-b9bd4c0cb9aa595c2648d43fce49961139f46971.tar.bz2 | |
Merge commit '8e124b0a129ab351ec6cae30d8358709d4c1430b'
From Simon Willison's branch: Use pformat for template contexts, which makes it
more readable
Diffstat (limited to 'debug_toolbar')
| -rw-r--r-- | debug_toolbar/media/toolbar.js | 1 | ||||
| -rw-r--r-- | debug_toolbar/panels/template.py | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/debug_toolbar/media/toolbar.js b/debug_toolbar/media/toolbar.js index 0b3624b..2c5a87b 100644 --- a/debug_toolbar/media/toolbar.js +++ b/debug_toolbar/media/toolbar.js @@ -49,7 +49,6 @@ jQuery(function($) { $('.panelContent').hide(); }); }); - jQuery(function() { jQuery.djDebug(); }); 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, |
