Fixed #25744 -- Corrected reference to User object in auth docs.

This commit is contained in:
Anderson Resende 2015-11-12 17:13:32 -03:00 committed by Tim Graham
parent 19a5f6da32
commit ce4914eab4
1 changed files with 6 additions and 6 deletions

View File

@ -115,12 +115,12 @@ Either way, ``authenticate`` should check the credentials it gets, and it
should return a ``User`` object that matches those credentials, if the should return a ``User`` object that matches those credentials, if the
credentials are valid. If they're not valid, it should return ``None``. credentials are valid. If they're not valid, it should return ``None``.
The Django admin system is tightly coupled to the Django ``User`` object The Django admin is tightly coupled to the Django :ref:`User object
described at the beginning of this document. For now, the best way to deal with <user-objects>`. The best way to deal with this is to create a Django ``User``
this is to create a Django ``User`` object for each user that exists for your object for each user that exists for your backend (e.g., in your LDAP
backend (e.g., in your LDAP directory, your external SQL database, etc.) You directory, your external SQL database, etc.) You can either write a script to
can either write a script to do this in advance, or your ``authenticate`` do this in advance, or your ``authenticate`` method can do it the first time a
method can do it the first time a user logs in. user logs in.
Here's an example backend that authenticates against a username and password Here's an example backend that authenticates against a username and password
variable defined in your ``settings.py`` file and creates a Django ``User`` variable defined in your ``settings.py`` file and creates a Django ``User``