Django Book 翻译
菜单>:
TOC
返回
原文:
``user_passes_test`` takes one required argument: a callable that takes a ``User`` object and returns ``True`` if the user is allowed to view the page. Note that ``user_passes_test`` does not automatically check that the ``User`` is authenticated; you should do that yourself.
翻译:
``user_passes_test`` 使用一个必需的参数:一个可调用的方法,当存在 ``User`` 对象并当此用户允许查看该页面时返回 ``True`` 。 注意 ``user_passes_test`` 不会自动检查 ``User`` 是否认证,你应该自己做这件事。
备注:
译者: