diff options
| author | Chris Beaven | 2009-09-29 12:13:36 +1300 |
|---|---|---|
| committer | Rob Hudson | 2009-09-30 07:09:27 -0700 |
| commit | d967726ddb04d558b75b72e540a663b731e2ff65 (patch) | |
| tree | 438ce9029eb294d3b5d19562e528089570f9d91e | |
| parent | 1b685252146aec3345adb7d2dec6d9f3173db678 (diff) | |
| download | django-debug-toolbar-d967726ddb04d558b75b72e540a663b731e2ff65.tar.bz2 | |
Template panel: Replace the sql_queries element from the template context rather than removing it.
Signed-off-by: Rob Hudson <rob@cogit8.org>
| -rw-r--r-- | debug_toolbar/panels/template.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/debug_toolbar/panels/template.py b/debug_toolbar/panels/template.py index 642cd3c..c3dc986 100644 --- a/debug_toolbar/panels/template.py +++ b/debug_toolbar/panels/template.py @@ -85,15 +85,14 @@ class TemplateDebugPanel(DebugPanel): for context_layer in context_data.dicts: for key, value in context_layer.items(): # Replace any request elements - they have a large - # unicode representation. The request data is already - # made available from the Request Vars panel. + # unicode representation and the request data is + # already made available from the Request Vars panel. if isinstance(value, http.HttpRequest): - context_layer[key] = '<request>' - # Remove the debugging sql_queries element from the - # context. The SQL data is already made available from - # the SQL panel. + context_layer[key] = '<<request>>' + # Replace the debugging sql_queries element. The SQL + # data is already made available from the SQL panel. elif key == 'sql_queries' and isinstance(value, list): - del context_layer[key] + context_layer[key] = '<<sql_queries>>' try: context_list.append(pformat(context_layer)) except UnicodeEncodeError: |
