周末没事整理了一下Django Model的数据类型,发上来的时候才发现空间发表格太困难了,还要切开发。下面是第一部分:
AutoField |
|
IntegerField |
||||||
BooleanField |
true/false |
|
||||||
CharField |
maxlength,必填 |
|
||||||
TextField |
|
|
||||||
CommaSeparatedIntegerField |
maxlength,必填 |
逗号分隔 |
||||||
DateField |
|
|
||||||
DateTimeField |
|
|
||||||
EmailField |
|
|
||||||
FileField |
upload_to,可选 |
object.get_myfile_url |
||||||
FilePathField |
|
|
||||||
FloatField |
|
|
关于作者