Django Book 翻译
菜单>:
TOC
返回
原文:
There are two ways you can use this ``perms`` object. You can use something like ``{{ perms.polls }}`` to check if the user has *any* permissions for some given application, or you can use something like ``{{ perms.polls.can_vote }}`` to check if the user has a specific permission.
翻译:
你有两种方式来使用 ``perms`` 对象。你可以使用类似于 ``{{ perms.polls }}`` 的形式来检查,对于某个特定的应用,一个用户是否具有 *任意* 权限;你也可以使用 ``{{ perms.polls.can_vote }}`` 这样的形式,来检查一个用户是否拥有特定的权限。
备注:
译者: