Django Book 翻译
菜单>:
TOC
返回
原文:
Once you have a ``User`` often from ``request.user`` , but possibly through one of the other methods discussed shortlyyou have a number of fields and methods available on that object. ``AnonymousUser`` objects emulate *some* of this interface, but not all of it, so you should always check ``user.is_authenticated()`` before assuming youre dealing with a bona fide user object. Tables 12-3 and 12-4 list the fields and methods, respectively, on ``User`` objects.
翻译:
``User`` 实例一般从 ``request.user`` ,或是其他下面即将要讨论到的方法取得,它有很多属性和方法。 ``AnonymousUser`` 对象模拟了 *部分* 的接口,但不是全部,在把它当成真正的user对象 使用前,你得检查一下 ``user.is_authenticated()``
备注:
译者: