Django Book 翻译
菜单>:
TOC
返回
原文:
Each fields type (e.g., ``CharField`` , ``DateField`` ) is determined by looking at the database column type (e.g., ``VARCHAR`` , ``DATE`` ). If ``inspectdb`` cannot map a columns type to a model field type, it will use ``TextField`` and will insert the Python comment ``'This field type is a guess.'`` next to the field in the generated model. Keep an eye out for that, and change the field type accordingly if needed.
翻译:
每一个字段类型,如CharField、DateField, 是通过查找数据库列类型如VARCHAR,DATE来确定的。如果inspectdb无法对某个model字段类型根据数据库列类型进行映射,那么它会使用TextField字段进行代替,并且会在所生成model字段后面加入Python注释“该字段类型是猜的”。因此,请特别注意这一点,并且在必要的时候相应的修改这些字段类型。
备注:
译者: