summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2007-07-13 05:03:33 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2007-07-13 05:03:33 +0000
commit6335317a423c9533a13d741c673fc45d1f052121 (patch)
tree31eb78c06443e33d82c4840eece24ebfb1fb04e3
parentb8d0dc73c762bedc0a36bb380cded62a7b3ea162 (diff)
Fixed #3505 -- Added handling for the error raised when the user forgets the comma in a single element tuple when defining AUTHENTICATION_BACKENDS. Thanks for the help identifying this problem, Mario Gonzalez <gonzalemario@gmail.com>.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5678 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/auth/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/contrib/auth/__init__.py b/django/contrib/auth/__init__.py
index 14ae020674..9813d9a2a2 100644
--- a/django/contrib/auth/__init__.py
+++ b/django/contrib/auth/__init__.py
@@ -12,6 +12,8 @@ def load_backend(path):
mod = __import__(module, {}, {}, [attr])
except ImportError, e:
raise ImproperlyConfigured, 'Error importing authentication backend %s: "%s"' % (module, e)
+ except ValueError, e:
+ raise ImproperlyConfigured, 'Error importing authentication backends. Is AUTHENTICATION_BACKENDS a correctly defined list or tuple?'
try:
cls = getattr(mod, attr)
except AttributeError: