AutoField |
**options |
integer |
在django代碼內是自增 |
BooleanField |
**options |
boolean\bit |
|
BinaryField |
[**options] |
blob |
|
BigIntegerField |
[**options] |
integer |
繼承自Integer |
CharField |
max_length=None[, **options] |
varchar |
|
CommaSeparatedIntegerField |
max_length=None[, **options] |
|
繼承自charField |
DateField |
[auto_now=False, auto_now_add=False, **options] |
date |
auto_now最後修改記錄的日期;auto_now_add添加記錄的日期 |
DateTimeField |
[auto_now=False, auto_now_add=False, **options] |
datetime |
auto_now最後修改記錄的日期;auto_now_add添加記錄的日期,繼承自DateField |
DecimalField |
max_digits=None, decimal_places=None[, **options] |
decimal |
|
DurationField |
default=[,**options] |
|
存儲時間段,可是貌似django的開發團隊尚未完善這個,有一些bug |
EmailField |
[max_length=75, **options] |
varchar |
|
FileField |
update_to = None[, max_length=100, **options] |
varchar |
update_to 指定保存目錄可帶格式 |
FilePathField |
path=None[, match=None, recursive=False, max_length=100, **options] |
varchar |
|
FloatField |
[**options] |
real |
|
GenericIPAddressField |
[**options, unpack_ipv4=False, protocol=u’both’] |
|
|
ImageField |
upload_to=None[, height_field=None, width_field=None, max_length=100, **options] |
varchar |
|
IntegerField |
[**options] |
integer |
|
IPAddressField |
[**options] |
varchar |
|
ManyToManyField |
othermodel[, **options] |
|
|
NullBooleanField |
[**options] |
|
bit字段上能夠設置null值 |
PositiveIntegerField |
[**options] |
integer |
繼承自IntegerField |
PositiveSmallIntegerField |
[**options] |
smallinteger |
|
URLField |
[verify_exists=True, max_length=200, **options] |
varchar |
|
UUIDField |
[verbose_name=None, **options] |
|
|
SlugField |
[max_length=50, **options] |
varchar |
標籤,內含索引 |
SmallIntegerField |
[**options] |
smallint |
繼承自IntegerField |
TimeField |
[auto_now=False, auto_now_add=False, **options] |
time |
auto_now最後修改記錄的日期;auto_now_add添加記錄的日期 |
TextField |
[**options] |
text |
|
XMLField |
schema_path=None[, **options] |
text |