1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

[soc2009/multidb] Renaming of database attributes - you now use NAME, ENGINE, etc rather than DATABASE_NAME, DATABASE_ENGINE inside DATABASES. Also deprecates the use of short names (.e.g., `sqlite3` for backends in ENGINE). Patch from Russell Keith-Magee.

Conflicts:

	docs/releases/1.2.txt

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11775 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Alex Gaynor
2009-11-23 16:45:41 +00:00
parent 3e6ae729bc
commit 4e36fffab2
55 changed files with 628 additions and 425 deletions

View File

@@ -8,18 +8,18 @@ class Book(models.Model):
# Can't run this test under SQLite, because you can't
# get two connections to an in-memory database.
if settings.DATABASES[DEFAULT_DB_ALIAS]['DATABASE_ENGINE'] != 'sqlite3':
if settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'] != 'django.db.backends.sqlite3':
class DeleteLockingTest(TransactionTestCase):
def setUp(self):
# Create a second connection to the database
conn_settings = settings.DATABASES[DEFAULT_DB_ALIAS]
self.conn2 = backend.DatabaseWrapper({
'DATABASE_HOST': conn_settings['DATABASE_HOST'],
'DATABASE_NAME': conn_settings['DATABASE_NAME'],
'DATABASE_OPTIONS': conn_settings['DATABASE_OPTIONS'],
'DATABASE_PASSWORD': conn_settings['DATABASE_PASSWORD'],
'DATABASE_PORT': conn_settings['DATABASE_PORT'],
'DATABASE_USER': conn_settings['DATABASE_USER'],
'HOST': conn_settings['HOST'],
'NAME': conn_settings['NAME'],
'OPTIONS': conn_settings['OPTIONS'],
'PASSWORD': conn_settings['PASSWORD'],
'PORT': conn_settings['PORT'],
'USER': conn_settings['USER'],
'TIME_ZONE': settings.TIME_ZONE,
})