Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #12428: Ensured that the dummy backend is installed correctly o…

…n a fresh project generated by django-admin.py startproject. Thanks to Simon for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11974 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a8155af4e95e7907af673db229ea63c6ab14bdbb 1 parent efbace6
Russell Keith-Magee freakboy3742 authored
Showing with 8 additions and 3 deletions.
  1. +5 −2 django/db/backends/dummy/base.py
  2. +3 −1 django/db/utils.py
7 django/db/backends/dummy/base.py
View
@@ -41,13 +41,16 @@ class DatabaseWrapper(object):
_commit = complain
_rollback = ignore
- def __init__(self, *args, **kwargs):
+ def __init__(self, settings_dict, alias, *args, **kwargs):
self.features = BaseDatabaseFeatures()
self.ops = DatabaseOperations()
self.client = DatabaseClient(self)
self.creation = BaseDatabaseCreation(self)
self.introspection = DatabaseIntrospection(self)
- self.validation = BaseDatabaseValidation()
+ self.validation = BaseDatabaseValidation(self)
+
+ self.settings_dict = settings_dict
+ self.alias = alias
def close(self):
pass
4 django/db/utils.py
View
@@ -55,7 +55,9 @@ def ensure_defaults(self, alias):
conn = self.databases[alias]
except KeyError:
raise ConnectionDoesNotExist("The connection %s doesn't exist" % alias)
- conn.setdefault('ENGINE', 'dummy')
+ conn.setdefault('ENGINE', 'django.db.backends.dummy')
+ if conn['ENGINE'] == 'django.db.backends.':
+ conn['ENGINE'] = 'django.db.backends.dummy'
conn.setdefault('OPTIONS', {})
conn.setdefault('TEST_CHARSET', None)
conn.setdefault('TEST_COLLATION', None)
Please sign in to comment.
Something went wrong with that request. Please try again.