Django Book 2.0 翻译
菜单>:
TOC
返回
原文:
If a database column name is a Python reserved word (such as
<1>
pass
<2>
,
<3>
class
<4>
, or
<5>
for
<6>
),
<7>
inspectdb
<8>
will append
<9>
'_field'
<10>
to the attribute name and set the
<11>
db_column
<12>
attribute to the real field name (e.g.,
<13>
pass
<14>
,
<15>
class
<16>
, or
<17>
for
<18>
).
翻译:
如果数据库中某个列的名字是Python的保留字(比如pass、class或者for等),inspectdb会在每个属性名后附加上_field,并将db_column属性设置为真实的字段名(也就是pass,class或者for等)。
备注:
译者:
(* 注意:由于翻译工作开始进入复审阶段,您提交的内容将会作为参考建议,谢谢您的宝贵建议。 *)