diff options
| author | Rob Hudson | 2008-09-20 15:54:22 -0700 | 
|---|---|---|
| committer | Rob Hudson | 2008-09-20 15:54:22 -0700 | 
| commit | 7f9f7e529f67f46390cf9c3d43813e96908306bf (patch) | |
| tree | bfb1a04973f0a00f9ae4a3efa0f0d22fc435618b /debug_toolbar/panels/template.py | |
| parent | 6bd25be6b8345f0a08c99acc35877faafd2a08ee (diff) | |
| parent | b9bd4c0cb9aa595c2648d43fce49961139f46971 (diff) | |
| download | django-debug-toolbar-7f9f7e529f67f46390cf9c3d43813e96908306bf.tar.bz2 | |
finishing up ajax work for sql explain
Diffstat (limited to 'debug_toolbar/panels/template.py')
| -rw-r--r-- | debug_toolbar/panels/template.py | 4 | 
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,  | 
