magic-removal: Fixed bug in error message when DATABASE_ENGINE setting is invald.

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1806 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-12-30 23:42:57 +00:00
parent c3aa635650
commit 76bc09a09a
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ except ImportError, e:
from django.core.exceptions import ImproperlyConfigured
import os
backend_dir = os.path.join(__path__[0], 'backends')
available_backends = [f for f in os.listdir(backend_dir) if not f.startswith('_') and not f.startswith('.')]
available_backends = [f for f in os.listdir(backend_dir) if not f.startswith('_') and not f.startswith('.') and not f.endswith('.py') and not f.endswith('.pyc')]
available_backends.sort()
raise ImproperlyConfigured, "Could not load database backend: %s. Is your DATABASE_ENGINE setting (currently, %r) spelled correctly? Available options are: %s" % \
(e, DATABASE_ENGINE, ", ".join(map(repr, available_backends)))