📜  null=true django - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:25.525000             🧑  作者: Mango

代码示例2
null=True sets NULL (versus NOT NULL) on the column in your DB. 
Blank values for Django field types such as DateTimeField or 
ForeignKey will be stored as NULL in the DB.

blank determines whether the field will be required in forms. 
This includes the admin and your custom forms. 
If blank=True then the field will not be required, 
whereas if it's False the field cannot be blank.