Fixed #12428: Ensured that the dummy backend is installed correctly on 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
This commit is contained in:
Russell Keith-Magee 2009-12-24 05:57:43 +00:00
parent efbace6b7e
commit a8155af4e9
2 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -55,7 +55,9 @@ class ConnectionHandler(object):
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)