diff options
| author | David Cramer | 2011-05-10 00:02:39 -0700 |
|---|---|---|
| committer | David Cramer | 2011-05-10 00:02:39 -0700 |
| commit | 875a26213b9c623ddc90bfcf92f419ac8b45d007 (patch) | |
| tree | 458cfcc32d2d31ea54a6538aaae0d8b0ff2b0af9 /debug_toolbar/utils/compat/db.py | |
| parent | 3292aff531d4dee5cf30a003d5d2ee745f718f86 (diff) | |
| parent | bbf99c1639bfec6d2edc4473f8adb278970db7a5 (diff) | |
| download | django-debug-toolbar-875a26213b9c623ddc90bfcf92f419ac8b45d007.tar.bz2 | |
Merge branch 'master' into andrepl-master
Conflicts:
debug_toolbar/middleware.py
Diffstat (limited to 'debug_toolbar/utils/compat/db.py')
| -rw-r--r-- | debug_toolbar/utils/compat/db.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/debug_toolbar/utils/compat/db.py b/debug_toolbar/utils/compat/db.py new file mode 100644 index 0000000..4273d9e --- /dev/null +++ b/debug_toolbar/utils/compat/db.py @@ -0,0 +1,13 @@ +from django.conf import settings +try: + from django.db import connections + dbconf = settings.DATABASES +except ImportError: + # Compat with < Django 1.2 + from django.db import connection + connections = {'default': connection} + dbconf = { + 'default': { + 'ENGINE': settings.DATABASE_ENGINE, + } + }
\ No newline at end of file |
