diff --git a/django/contrib/auth/__init__.py b/django/contrib/auth/__init__.py index 2150893022..1c821801ef 100644 --- a/django/contrib/auth/__init__.py +++ b/django/contrib/auth/__init__.py @@ -38,7 +38,7 @@ def authenticate(**credentials): if user is None: continue # Annotate the user object with the path of the backend. - user.backend = str(backend.__class__) + user.backend = "%s.%s" % (backend.__module__, backend.__class__.__name__) return user def login(request, user):