Django Book 翻译
菜单>:
TOC
返回
原文:
To authenticate a given username and password, use ``authenticate()`` . It takes two keyword arguments, ``username`` and ``password`` , and it returns a ``User`` object if the password is valid for the given username. If the password is invalid, ``authenticate()`` returns ``None`` :
翻译:
认证给出的用户名和密码,使用 ``authenticate()`` 函数。它接受两个参数,用户名 ``username`` 和 密码 ``password`` ,并在密码对用给出的用户名是合法的情况下返回一个 ``User`` 对象。当给出的密码不合法的时候 ``authenticate()`` 函数返回 ``None`` :
备注:
译者: