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
This commit is contained in:
parent
b8d0dc73c7
commit
6335317a42
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue