Author: jpellerin
Date: 2006-07-11 15:38:27 -0500 (Tue, 11 Jul 2006)
New Revision: 3335

Modified:
   django/branches/multiple-db-support/django/conf/global_settings.py
   django/branches/multiple-db-support/tests/runtests.py
Log:
[multi-db] Changed name of optional named databases setting to 
OTHER_DATABASES.


Modified: django/branches/multiple-db-support/django/conf/global_settings.py
===================================================================
--- django/branches/multiple-db-support/django/conf/global_settings.py  
2006-07-11 20:37:07 UTC (rev 3334)
+++ django/branches/multiple-db-support/django/conf/global_settings.py  
2006-07-11 20:38:27 UTC (rev 3335)
@@ -98,7 +98,7 @@
 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'

Modified: django/branches/multiple-db-support/tests/runtests.py
===================================================================
--- django/branches/multiple-db-support/tests/runtests.py       2006-07-11 
20:37:07 UTC (rev 3334)
+++ django/branches/multiple-db-support/tests/runtests.py       2006-07-11 
20:38:27 UTC (rev 3335)
@@ -163,7 +163,7 @@
         # 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 @@
         
         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 @@
             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 @@
         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()


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to