Django Book 翻译
菜单>:
TOC
返回
原文:
.. table:: Table 12-3. Fields on ``User`` Objects +----------------+-----------------------------------------------------------------+ |Field |Description | +================+=================================================================+ |``username`` |Required; 30 characters or fewer. Alphanumeric characters only | | |(letters, digits, and underscores). | +----------------+-----------------------------------------------------------------+ |``first_name`` |Optional; 30 characters or fewer. | +----------------+-----------------------------------------------------------------+ |``last_name`` |Optional; 30 characters or fewer. | +----------------+-----------------------------------------------------------------+ |``email`` |Optional. Email address. | +----------------+-----------------------------------------------------------------+ |``password`` |Required. A hash of, and metadata about, the password (Django | | |doesnt store the raw password). See the Passwords section for | | |more about this value. | +----------------+-----------------------------------------------------------------+ |``is_staff`` |Boolean. Designates whether this user can access the admin site. | +----------------+-----------------------------------------------------------------+ |``is_active`` |Boolean. Designates whether this account can be used to log in. | | |Set this flag to ``False`` instead of deleting accounts. | +----------------+-----------------------------------------------------------------+ |``is_superuser``|Boolean. Designates that this user has all permissions without | | |explicitly assigning them. | +----------------+-----------------------------------------------------------------+ |``last_login`` |A datetime of the users last login. This is set to the current | | |date/time by default. | +----------------+-----------------------------------------------------------------+ |``date_joined`` |A datetime designating when the account was created. This is set | | |to the current date/time by default when the account is created. | +----------------+-----------------------------------------------------------------+
翻译:
.. table:: 表 12-3. ``User`` 对象属性 +----------------+-----------------------------------------------------------------+ |属性 |描述 | +================+=================================================================+ |``username`` |必填; 少于等于30字符. 只允许字符,数字,下划线 | +----------------+-----------------------------------------------------------------+ |``first_name`` |可选; 少于等于30字符. | +----------------+-----------------------------------------------------------------+ |``last_name`` |可选; 少于等于30字符. | +----------------+-----------------------------------------------------------------+ |``email`` |可选. 邮件地址. | +----------------+-----------------------------------------------------------------+ |``password`` |必填. 密码的摘要hash(Django不会存储原始密码),详见密码章节部分 | +----------------+-----------------------------------------------------------------+ |``is_staff`` |布尔值. 用户是否拥有网站的管理权限. | +----------------+-----------------------------------------------------------------+ |``is_active`` |布尔值. 是否允许用户登录, 设置为``False``,可以不用删除用户来禁止| | |用户登录 | +----------------+-----------------------------------------------------------------+ |``is_superuser``|布尔值. 用户是否拥有所有权限,而无需任何显式的权限分配定义 | +----------------+-----------------------------------------------------------------+ |``last_login`` |用户最后登录的时间,缺省会设置为当前时间 | +----------------+-----------------------------------------------------------------+ |``date_joined`` |创建用户的时间,当用户创建时,缺省的设置为当前的时间 | +----------------+-----------------------------------------------------------------+
备注:
译者: