Django Book 翻译
菜单>:
TOC
返回
原文:
Once thats done, you can access a users profile by calling ``user.get_profile()`` . This function could raise a ``SiteProfileNotAvailable`` exception if ``AUTH_PROFILE_MODULE`` isnt defined, or it could raise a ``DoesNotExist`` exception if the user doesnt have a profile already (youll usually catch that exception and create a new profile at that time).
翻译:
一旦完成,你就可以通过调用 ``user.get_profile()`` 函数来获得用户档案。如果 ``AUTH_PROFILE_MODULE`` 变量没有设置,这个函数可能会抛出 ``SiteProfileNotAvailable`` 异常;如果这个用户不存在档案,也可能会抛出 ``DoesNotExist`` 异常(通常情况下,你会捕获这个异常并在当时创建一个新的档案)。
备注:
译者: