magic-removal: Changed django/db/__init__.py to raise ImproperlyConfigured if DATABASE_ENGINE is blank.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
58f61e0373
commit
7e8b3e7d5e
|
@ -2,6 +2,10 @@ from django.conf.settings import DATABASE_ENGINE
|
|||
|
||||
__all__ = ('backend', 'connection', 'DatabaseError')
|
||||
|
||||
if not DATABASE_ENGINE:
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
raise ImproperlyConfigured, "You haven't set the DATABASE_ENGINE setting yet."
|
||||
|
||||
try:
|
||||
backend = __import__('django.db.backends.%s.base' % DATABASE_ENGINE, '', '', [''])
|
||||
except ImportError, e:
|
||||
|
|
Loading…
Reference in New Issue