Changeset 3430
- Timestamp:
- 07/22/06 23:05:30 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/multiple-db-support/django/db/__init__.py
r3428 r3430 1 from django import conf1 from django.conf import settings, UserSettingsHolder 2 2 from django.core import signals 3 3 from django.core.exceptions import ImproperlyConfigured … … 20 20 21 21 22 if not conf.settings.DATABASE_ENGINE:23 conf.settings.DATABASE_ENGINE = 'dummy'22 if not settings.DATABASE_ENGINE: 23 settings.DATABASE_ENGINE = 'dummy' 24 24 25 25 … … 50 50 def __init__(self, settings=None): 51 51 if settings is None: 52 settings = conf.settings52 from django.conf import settings 53 53 self.settings = settings 54 54 self.backend = self.load_backend() … … 145 145 connection is returned. 146 146 """ 147 settings = conf.settings148 147 try: 149 148 cnx = self.local.connections … … 154 153 cnx[name].close() 155 154 if name is _default: 156 cnx[name] = connect( conf.settings)155 cnx[name] = connect(settings) 157 156 return cnx[name] 158 157 try: … … 168 167 # pass global settings so that the default connection settings 169 168 # can be defaults for the named connections. 170 database = conf.UserSettingsHolder(settings)169 database = UserSettingsHolder(settings) 171 170 for k, v in info.items(): 172 171 setattr(database, k, v) … … 182 181 current settings. 183 182 """ 184 settings = conf.settings185 183 app = klass._meta.app_label 186 184 model = klass.__name__
