mirror of
https://github.com/django/django.git
synced 2025-07-04 01:39:20 +00:00
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')
|
__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:
|
try:
|
||||||
backend = __import__('django.db.backends.%s.base' % DATABASE_ENGINE, '', '', [''])
|
backend = __import__('django.db.backends.%s.base' % DATABASE_ENGINE, '', '', [''])
|
||||||
except ImportError, e:
|
except ImportError, e:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user