mirror of
https://github.com/django/django.git
synced 2024-12-25 02:26:12 +00:00
Fixed #15336 -- Silenced a warning about the DATABASES transition when a database backend isn't specified. Thanks to Ivan Sagalaev for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15571 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
c63bc87a98
commit
563a164c05
@ -12,11 +12,12 @@ __all__ = ('backend', 'connection', 'connections', 'router', 'DatabaseError',
|
||||
# For backwards compatibility - Port any old database settings over to
|
||||
# the new values.
|
||||
if not settings.DATABASES:
|
||||
import warnings
|
||||
warnings.warn(
|
||||
"settings.DATABASE_* is deprecated; use settings.DATABASES instead.",
|
||||
DeprecationWarning
|
||||
)
|
||||
if settings.DATABASE_ENGINE:
|
||||
import warnings
|
||||
warnings.warn(
|
||||
"settings.DATABASE_* is deprecated; use settings.DATABASES instead.",
|
||||
DeprecationWarning
|
||||
)
|
||||
|
||||
settings.DATABASES[DEFAULT_DB_ALIAS] = {
|
||||
'ENGINE': settings.DATABASE_ENGINE,
|
||||
|
Loading…
Reference in New Issue
Block a user