Django Book 翻译
菜单>:
TOC
返回
原文:
The raw way is to run your test on ``request.user`` in the view directly. For example, this view checks to make sure the user is logged in and has the permission ``polls.can_vote`` (more about how permissions works follows):
翻译:
一般的方法是直接在视图的 ``request.user`` 上运行检查。例如,下面视图检查用户登陆并是否有 ``polls.can_vote`` 的权限:
备注:
译者: