0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Fixed #10833 -- Corrected load_backend so that it actually loads the requested backend, rather than always loading settings.DATABASE_BACKEND. Thanks to Alex Gaynor for the report and fix.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10560 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2009-04-16 12:44:32 +00:00
parent bd8afb1894
commit f0d75dbe3e

View File

@ -14,7 +14,7 @@ def load_backend(backend_name):
try:
# Most of the time, the database backend will be one of the official
# backends that ships with Django, so look there first.
return import_module('.base', 'django.db.backends.%s' % settings.DATABASE_ENGINE)
return import_module('.base', 'django.db.backends.%s' % backend_name)
except ImportError, e:
# If the import failed, we might be looking for a database backend
# distributed external to Django. So we'll try that next.