Skip to content

Commit 6335317

Browse files
committed
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
1 parent b8d0dc7 commit 6335317

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

django/contrib/auth/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ def load_backend(path):
1212
mod = __import__(module, {}, {}, [attr])
1313
except ImportError, e:
1414
raise ImproperlyConfigured, 'Error importing authentication backend %s: "%s"' % (module, e)
15+
except ValueError, e:
16+
raise ImproperlyConfigured, 'Error importing authentication backends. Is AUTHENTICATION_BACKENDS a correctly defined list or tuple?'
1517
try:
1618
cls = getattr(mod, attr)
1719
except AttributeError:

0 commit comments

Comments
 (0)