From d967726ddb04d558b75b72e540a663b731e2ff65 Mon Sep 17 00:00:00 2001 From: Chris Beaven Date: Tue, 29 Sep 2009 12:13:36 +1300 Subject: Template panel: Replace the sql_queries element from the template context rather than removing it. Signed-off-by: Rob Hudson --- debug_toolbar/panels/template.py | 13 ++++++------- 1 file 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] = '' - # Remove the debugging sql_queries element from the - # context. The SQL data is already made available from - # the SQL panel. + context_layer[key] = '<>' + # 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] = '<>' try: context_list.append(pformat(context_layer)) except UnicodeEncodeError: -- cgit v1.2.3