Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.2.X] Fixed #15336 -- Silenced a warning about the DATABASES transi…

…tion when a database backend isn't specified. Thanks to Ivan Sagalaev for the report and patch.

Backport of r15571 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15575 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 10a12cd6f261f4804850710be9bcdb24026d7fd2 1 parent 19fa3bc
@freakboy3742 freakboy3742 authored
Showing with 6 additions and 5 deletions.
  1. +6 −5 django/db/__init__.py
View
11 django/db/__init__.py
@@ -12,11 +12,12 @@
# 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.",
- PendingDeprecationWarning
- )
+ if settings.DATABASE_ENGINE:
+ import warnings
+ warnings.warn(
+ "settings.DATABASE_* is deprecated; use settings.DATABASES instead.",
+ PendingDeprecationWarning
+ )
settings.DATABASES[DEFAULT_DB_ALIAS] = {
'ENGINE': settings.DATABASE_ENGINE,
Please sign in to comment.
Something went wrong with that request. Please try again.