Skip to content

Commit

Permalink
Fixed #15621 -- Fixed potentially confusing error message in db backe…
Browse files Browse the repository at this point in the history
…nd loading. Thanks, keegan_csmith

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15871 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed Mar 17, 2011
1 parent a0878b5 commit 6091f0e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions django/db/utils.py
Expand Up @@ -41,6 +41,8 @@ def load_backend(backend_name):
and not f.startswith('.')]
except EnvironmentError:
available_backends = []
if backend_name.startswith('django.db.backends.'):
backend_name = backend_name[19:] # See #15621.
if backend_name not in available_backends:
error_msg = ("%r isn't an available database backend. \n" +
"Try using django.db.backends.XXX, where XXX is one of:\n %s\n" +
Expand Down

0 comments on commit 6091f0e

Please sign in to comment.