From 4a59813e75d7cb3b88bf2b223b21d4e23d9ecb03 Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Fri, 28 Aug 2009 09:13:37 -0700 Subject: Fixed sql profiling so it doesn't return a 500 if the SQL `SET PROFILING=1` results in an error. Also fixed view to render the correct template. --- .../debug_toolbar/panels/sql_profile.html | 51 ++++++++++++---------- 1 file changed, 29 insertions(+), 22 deletions(-) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html b/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html index 7df65da..0dcb0b9 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html @@ -4,28 +4,35 @@

SQL Profiled

-
-
{% trans "Executed SQL" %}
-
{{ sql|safe }}
-
{% trans "Time" %}
-
{{ time }} ms
-
- - - - {% for h in headers %} - - {% endfor %} - - - - {% for row in result %} - - {% for column in row %} - + {% if result %} +
+
{% trans "Executed SQL" %}
+
{{ sql|safe }}
+
{% trans "Time" %}
+
{{ time }} ms
+
+
{{ h|upper }}
{{ column|escape }}
+ + + {% for h in headers %} + {% endfor %} - {% endfor %} - -
{{ h|upper }}
+ + + {% for row in result %} + + {% for column in row %} + {{ column|escape }} + {% endfor %} + + {% endfor %} + + + {% else %} +
+
{% trans 'Error' %}
+
{{ result_error }}
+
+ {% endif %}
-- cgit v1.2.3