diff options
| author | Jason Pellerin <jpellerin@gmail.com> | 2006-07-11 20:38:27 +0000 |
|---|---|---|
| committer | Jason Pellerin <jpellerin@gmail.com> | 2006-07-11 20:38:27 +0000 |
| commit | 49ce784805b9db3cc7523f2c391cc67f934dddca (patch) | |
| tree | 3fe21ba9add94b0d9b8f32a856e46120567f9d13 | |
| parent | 97d1f60d7729f37a516514e0d80c716f45e53b41 (diff) | |
[multi-db] Changed name of optional named databases setting to
OTHER_DATABASES.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3335 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/conf/global_settings.py | 2 | ||||
| -rwxr-xr-x | tests/runtests.py | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py index 9ef92e10dd..ec201893f8 100644 --- a/django/conf/global_settings.py +++ b/django/conf/global_settings.py @@ -98,7 +98,7 @@ DATABASE_HOST = '' # Set to empty string for localhost. Not used wit DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. # Optional named database connections in addition to the default. -DATABASES = {} +OTHER_DATABASES = {} # Host for sending e-mail. EMAIL_HOST = 'localhost' diff --git a/tests/runtests.py b/tests/runtests.py index 85f0c67785..b712d1352a 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -163,7 +163,7 @@ class TestRunner: # replacing any named connections defined in settings. All connections # will use the default DATABASE_ENGINE self.old_database_name = settings.DATABASE_NAME - self.old_databases = settings.DATABASES + self.old_databases = settings.OTHER_DATABASES if settings.DATABASE_ENGINE == 'sqlite3': # If we're using SQLite, it's more convenient to test against an @@ -173,7 +173,7 @@ class TestRunner: new_databases = {} for db_name in TEST_DATABASES: - db_st = settings.DATABASES.setdefault(db_name, {}) + db_st = settings.OTHER_DATABASES.setdefault(db_name, {}) engine = db_st.get('DATABASE_ENGINE', settings.DATABASE_ENGINE) if engine == 'sqlite3': db_st['DATABASE_NAME'] = self._tempfile() @@ -181,10 +181,10 @@ class TestRunner: else: db_st['DATABASE_NAME'] = db_name new_databases[db_name] = db_st - settings.DATABASES = new_databases + settings.OTHER_DATABASES = new_databases self.create_test_db(TEST_DATABASE_NAME, connection) - for name, info in settings.DATABASES.items(): + for name, info in settings.OTHER_DATABASES.items(): cx = connections[name] test_connection = self.create_test_db(info['DATABASE_NAME'], cx.connection) @@ -205,7 +205,7 @@ class TestRunner: from django.conf import settings connection.close() settings.DATABASE_NAME = self.old_database_name - settings.DATABASES = self.old_databases + settings.OTHER_DATABASES = self.old_databases for db_name, cx in self.created_dbs: settings = cx.settings cx.close() |
