From 660f80c3d60083ecba26c83c0670ccca7fc56e09 Mon Sep 17 00:00:00 2001 From: Preston Holmes Date: Wed, 6 Feb 2013 14:25:51 -0800 Subject: [1.5.x] Fixed #19662 -- alter auth modelbackend to accept custom username fields Thanks to Aymeric and Carl for the review. --- docs/ref/contrib/auth.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt index 414f4558ee..b12c99fb91 100644 --- a/docs/ref/contrib/auth.txt +++ b/docs/ref/contrib/auth.txt @@ -417,9 +417,15 @@ The following backends are available in :mod:`django.contrib.auth.backends`: .. class:: ModelBackend This is the default authentication backend used by Django. It - authenticates using usernames and passwords stored in the - :class:`~django.contrib.auth.models.User` model. - + authenticates using credentials consisting of a user identifier and + password. For Django's default user model, the user identifier is the + username, for custom user models it is the field specified by + USERNAME_FIELD (see :doc:`Customizing Users and authentication + `). + + It also handles the default permissions model as defined for + :class:`~django.contrib.auth.models.User` and + :class:`~django.contrib.auth.models.PermissionsMixin`. .. class:: RemoteUserBackend -- cgit v1.3