diff options
| author | pzinovkin | 2011-10-09 10:02:51 +0400 | 
|---|---|---|
| committer | pzinovkin | 2011-10-09 10:02:51 +0400 | 
| commit | f9e17dba1ae97c48203fc5cc45798a06df4bb0d9 (patch) | |
| tree | 9f88bbd984d739902fe70f46a89dd950accfd087 /debug_toolbar/views.py | |
| parent | 0890d36d2e858035ab9eaad01627f51b578a2dfa (diff) | |
| download | django-debug-toolbar-f9e17dba1ae97c48203fc5cc45798a06df4bb0d9.tar.bz2 | |
Fix for error  'Settings' object has no attribute 'DATABASE_ENGINE'
Diffstat (limited to 'debug_toolbar/views.py')
| -rw-r--r-- | debug_toolbar/views.py | 5 | 
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 | 
