aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar
diff options
context:
space:
mode:
authorDavid Cramer2011-10-09 11:46:57 -0700
committerDavid Cramer2011-10-09 11:46:57 -0700
commitf9679aadc3b832b53dcadcdde3bfced82981b6a6 (patch)
tree9f88bbd984d739902fe70f46a89dd950accfd087 /debug_toolbar
parent0890d36d2e858035ab9eaad01627f51b578a2dfa (diff)
parentf9e17dba1ae97c48203fc5cc45798a06df4bb0d9 (diff)
downloaddjango-debug-toolbar-f9679aadc3b832b53dcadcdde3bfced82981b6a6.tar.bz2
Merge pull request #222 from pzinovkin/master
Fix for error 'Settings' object has no attribute 'DATABASE_ENGINE' (#208)
Diffstat (limited to 'debug_toolbar')
-rw-r--r--debug_toolbar/views.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/debug_toolbar/views.py b/debug_toolbar/views.py
index e0c80aa..dd9916b 100644
--- a/debug_toolbar/views.py
+++ b/debug_toolbar/views.py
@@ -82,7 +82,10 @@ def sql_explain(request):
params = simplejson.loads(params)
cursor = connections[alias].cursor()
- if settings.DATABASE_ENGINE == "sqlite3":
+ conn = connections[alias].connection
+ engine = conn.__class__.__module__.split('.', 1)[0]
+
+ if engine == "sqlite3":
# SQLite's EXPLAIN dumps the low-level opcodes generated for a query;
# EXPLAIN QUERY PLAN dumps a more human-readable summary
# See http://www.sqlite.org/lang_explain.html for details