Kaydet (Commit) d4ddc060 authored tarafından Adrian Holovaty's avatar Adrian Holovaty

Changed core.db to give a friendlier error message if the DATABASE_ENGINE setting is invalid

git-svn-id: http://code.djangoproject.com/svn/django/trunk@160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 272b2175
......@@ -15,7 +15,11 @@ let us do that.
from django.conf.settings import DATABASE_ENGINE
dbmod = __import__('django.core.db.backends.%s' % DATABASE_ENGINE, '', '', [''])
try:
dbmod = __import__('django.core.db.backends.%s' % DATABASE_ENGINE, '', '', [''])
except ImportError:
from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured, "Your DATABASE_ENGINE setting, %r, is invalid. Is it spelled correctly?" % DATABASE_ENGINE
DatabaseError = dbmod.DatabaseError
db = dbmod.DatabaseWrapper()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment