mirror of
https://github.com/django/django.git
synced 2025-07-05 18:29:11 +00:00
[multi-db] Cleaned up settings access in ConnectionInfo.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
3d8ebb3bec
commit
763e087de1
@ -56,8 +56,8 @@ class ConnectionInfo(object):
|
|||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "Connection: %r (ENGINE=%s NAME=%s)" \
|
return "Connection: %r (ENGINE=%s NAME=%s)" \
|
||||||
% (self.connection,
|
% (self.connection,
|
||||||
self.connection.settings.DATABASE_ENGINE,
|
self.settings.DATABASE_ENGINE,
|
||||||
self.connection.settings.DATABASE_NAME)
|
self.settings.DATABASE_NAME)
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
"""Close connection"""
|
"""Close connection"""
|
||||||
@ -118,7 +118,7 @@ class LazyConnectionManager(object):
|
|||||||
except AttributeError:
|
except AttributeError:
|
||||||
raise ImproperlyConfigured, \
|
raise ImproperlyConfigured, \
|
||||||
"No DATABASES in settings."
|
"No DATABASES in settings."
|
||||||
|
|
||||||
# In settings it's a dict, but connect() needs an object
|
# In settings it's a dict, but connect() needs an object
|
||||||
# pass global settings so that the default connection settings
|
# pass global settings so that the default connection settings
|
||||||
# can be defaults for the named connections
|
# can be defaults for the named connections
|
||||||
|
Loading…
x
Reference in New Issue
Block a user