From 64794a5a1d342ffeceae9ddaa55c81384d54702f Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Tue, 9 Dec 2008 12:44:07 -0800 Subject: Only show the SQL profile if we're using a MySQL database backend. --- debug_toolbar/panels/sql.py | 1 + debug_toolbar/templates/debug_toolbar/panels/sql.html | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'debug_toolbar') diff --git a/debug_toolbar/panels/sql.py b/debug_toolbar/panels/sql.py index e202994..22d2690 100644 --- a/debug_toolbar/panels/sql.py +++ b/debug_toolbar/panels/sql.py @@ -65,6 +65,7 @@ class SQLDebugPanel(DebugPanel): context = { 'queries': sql_queries, 'sql_time': self._sql_time, + 'is_mysql': settings.DATABASE_ENGINE == 'mysql', } return render_to_string('debug_toolbar/panels/sql.html', context) diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index f6ff64f..7de2220 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -15,7 +15,9 @@ {% if query.params %} SELECT EXPLAIN - PROFILE + {% if is_mysql %} + PROFILE + {% endif %} {% endif %} {{ query.sql|safe }} -- cgit v1.2.3