Changeset 7482 for django/branches/gis/django/db/__init__.py
- Timestamp:
- 04/27/08 12:17:04 (9 months ago)
- Files:
-
- django/branches/gis (modified) (1 prop)
- django/branches/gis/django/db/__init__.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/gis
- Property svnmerge-integrated changed from /django/trunk:1-7441 to /django/trunk:1-7481
django/branches/gis/django/db/__init__.py
r6920 r7482 12 12 13 13 try: 14 # Most of the time, the database backend will be one of the official 14 # Most of the time, the database backend will be one of the official 15 15 # backends that ships with Django, so look there first. 16 16 _import_path = 'django.db.backends.' 17 17 backend = __import__('%s%s.base' % (_import_path, settings.DATABASE_ENGINE), {}, {}, ['']) 18 creation = __import__('%s%s.creation' % (_import_path, settings.DATABASE_ENGINE), {}, {}, ['']) 18 19 except ImportError, e: 19 # If the import failed, we might be looking for a database backend 20 # If the import failed, we might be looking for a database backend 20 21 # distributed external to Django. So we'll try that next. 21 22 try: 22 23 _import_path = '' 23 24 backend = __import__('%s.base' % settings.DATABASE_ENGINE, {}, {}, ['']) 25 creation = __import__('%s.creation' % settings.DATABASE_ENGINE, {}, {}, ['']) 24 26 except ImportError, e_user: 25 27 # The database backend wasn't found. Display a helpful error message … … 38 40 return __import__('%s%s.%s' % (import_path, settings.DATABASE_ENGINE, module_name), {}, {}, ['']) 39 41 40 # We don't want to import the introspect /creation modules unless41 # someone asks for 'em, so lazily load themon demmand.42 # We don't want to import the introspect module unless someone asks for it, so 43 # lazily load it on demmand. 42 44 get_introspection_module = curry(_import_database_module, _import_path, 'introspection') 43 get_creation_module = curry(_import_database_module, _import_path, 'creation') 45 46 def get_creation_module(): 47 return creation 44 48 45 49 # We want runshell() to work the same way, but we have to treat it a
