当我们在django中添加数据库字段时,我们通常会写models.CharField(max_length=100, null=True, blank=True)
.同样是用ForeignKey
,DecimalField
等等.有什么基本的区别
null=True
只要blank=True
只要null=True
, blank=True
在相对于不同的(CharField
,ForeignKey
,ManyToManyField
,DateTimeField
)字段.使用1/2/3有哪些优点/缺点?