mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	fixes #133 -- thanks Joeri
git-svn-id: http://code.djangoproject.com/svn/django/trunk@269 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -17,7 +17,7 @@ from django.conf.settings import DATABASE_ENGINE | |||||||
|  |  | ||||||
| try: | try: | ||||||
|     dbmod = __import__('django.core.db.backends.%s' % DATABASE_ENGINE, '', '', ['']) |     dbmod = __import__('django.core.db.backends.%s' % DATABASE_ENGINE, '', '', ['']) | ||||||
| except ImportError: | except ImportError, exc: | ||||||
|     # The database backend wasn't found. Display a helpful error message |     # The database backend wasn't found. Display a helpful error message | ||||||
|     # listing all possible database backends. |     # listing all possible database backends. | ||||||
|     from django.core.exceptions import ImproperlyConfigured |     from django.core.exceptions import ImproperlyConfigured | ||||||
| @@ -25,8 +25,8 @@ except ImportError: | |||||||
|     backend_dir = os.path.join(__path__[0], 'backends') |     backend_dir = os.path.join(__path__[0], 'backends') | ||||||
|     available_backends = [f[:-3] for f in os.listdir(backend_dir) if f.endswith('.py') and not f.startswith('__init__')] |     available_backends = [f[:-3] for f in os.listdir(backend_dir) if f.endswith('.py') and not f.startswith('__init__')] | ||||||
|     available_backends.sort() |     available_backends.sort() | ||||||
|     raise ImproperlyConfigured, "Your DATABASE_ENGINE setting, %r, is invalid. Is it spelled correctly? Available options are: %s" % \ |     raise ImproperlyConfigured, "Could not load database backend: %s. Is DATABASE_ENGINE (currently, %r) spelled correctly? Available options are: %s" % (exc, DATABASE_ENGINE, ", ".join(map(repr, available_backends))) | ||||||
|         (DATABASE_ENGINE, ', '.join(map(repr, available_backends))) |         #(DATABASE_ENGINE, ', '.join(map(repr, available_backends)))k | ||||||
|  |  | ||||||
| DatabaseError = dbmod.DatabaseError | DatabaseError = dbmod.DatabaseError | ||||||
| db = dbmod.DatabaseWrapper() | db = dbmod.DatabaseWrapper() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user