diff options
| author | Rob Hudson | 2009-08-07 07:18:32 -0700 |
|---|---|---|
| committer | Rob Hudson | 2009-08-07 07:18:32 -0700 |
| commit | 7802b9dabc3c02631330c7f30b5707e63a05da38 (patch) | |
| tree | 545a44e3326ebaaee6ee464eea0817787e449083 /debug_toolbar/panels/template.py | |
| parent | 0584848bb88528feb5d2b2d234848d410b1beefb (diff) | |
| parent | 658c7384112cc45ec04343b03ce7f670b012ab0e (diff) | |
| download | django-debug-toolbar-7802b9dabc3c02631330c7f30b5707e63a05da38.tar.bz2 | |
Merge branch 'master' into debug-sql-shell
Diffstat (limited to 'debug_toolbar/panels/template.py')
| -rw-r--r-- | debug_toolbar/panels/template.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/debug_toolbar/panels/template.py b/debug_toolbar/panels/template.py index 7dc7b06..b548287 100644 --- a/debug_toolbar/panels/template.py +++ b/debug_toolbar/panels/template.py @@ -72,7 +72,14 @@ class TemplateDebugPanel(DebugPanel): info['template'] = t # Clean up context for better readability c = d.get('context', None) - info['context'] = '\n'.join([pformat(_d) for _d in c.dicts]) + + d_list = [] + for _d in c.dicts: + try: + d_list.append(pformat(d)) + except UnicodeEncodeError: + pass + info['context'] = '\n'.join(d_list) template_context.append(info) context = { 'templates': template_context, |
