django 数据模型中 null=True 和 blank=True 有什么区别
1 回答

萧十郎
TA贡献1815条经验 获得超13个赞
null:
If True, Django will store empty values as NULL in the database. Default
is False.
如果为True,空值将会被存储为NULL,默认为False。
blank:
If True, the field is allowed to be blank. Default is False.
如果为True,字段允许为空,默认不允许。
- 1 回答
- 0 关注
- 741 浏览
添加回答
举报
0/150
提交
取消