Django Book 翻译
菜单>:
TOC
返回
原文:
Since its a relatively common task to check whether a user has a particular permission, Django provides a shortcut for that case: the ``permission_required()`` decorator. Using this decorator, the earlier example can be written as follows:
翻译:
既然检查用户是否有一个特殊权限是相对常见的任务,Django为这种情形提供了一个捷径: ``permission_required()`` 装饰器 使用这个装饰器,前面的例子可以这样写:
备注:
译者: