diff options
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/__init__.py | 5 |
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 |
