summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorJason Pellerin <jpellerin@gmail.com>2006-06-29 22:00:25 +0000
committerJason Pellerin <jpellerin@gmail.com>2006-06-29 22:00:25 +0000
commita50d895f289cee37b5ae53f1bee33fbdea5a0fa3 (patch)
treee2ad4248fa970073f2a686476afede97a6d5e49c /django
parent75b64abaa7cc1818aec9c29c28d93e226ec3b1cb (diff)
[multi-db] Updated tests/runtests.py to create test databases for all
named connections (if any) in addition to the default connection. Updated LazyConnectionManager to allow assignment to connection names. git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3238 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/db/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/db/__init__.py b/django/db/__init__.py
index d37e8b34c7..ed0b8a4fb9 100644
--- a/django/db/__init__.py
+++ b/django/db/__init__.py
@@ -96,9 +96,12 @@ class LazyConnectionManager(object):
def __getitem__(self, k):
try:
- return self._connections[k]
+ return self.__dict__['_connections'][k]
except KeyError:
return self.connect(k)
+
+ def __setitem__(self, k, v):
+ self.__dict__['_connections'][k] = v
def connect(self, name):
"""Return the connection with this name in