Ticket #133: django-patch.diff
File django-patch.diff, 1.3 KB (added by , 19 years ago) |
---|
-
django/core/db/__init__.py
17 17 18 18 try: 19 19 dbmod = __import__('django.core.db.backends.%s' % DATABASE_ENGINE, '', '', ['']) 20 except ImportError :20 except ImportError, exc: 21 21 # The database backend wasn't found. Display a helpful error message 22 22 # listing all possible database backends. 23 23 from django.core.exceptions import ImproperlyConfigured … … 25 25 backend_dir = os.path.join(__path__[0], 'backends') 26 26 available_backends = [f[:-3] for f in os.listdir(backend_dir) if f.endswith('.py') and not f.startswith('__init__')] 27 27 available_backends.sort() 28 raise ImproperlyConfigured, " Your DATABASE_ENGINE setting, %r, is invalid. Is it spelled correctly? Available options are: %s" % \29 (DATABASE_ENGINE, ', '.join(map(repr, available_backends)))28 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))) 29 #(DATABASE_ENGINE, ', '.join(map(repr, available_backends)))k 30 30 31 31 DatabaseError = dbmod.DatabaseError 32 32 db = dbmod.DatabaseWrapper()