When we add a database field in django we generally write models.CharField(max_length=100, null=True, blank=True)
. 當咱們在Django中添加數據庫字段時,一般會編寫models.CharField(max_length=100, null=True, blank=True)
。 The same is done with ForeignKey
, DecimalField
etc. What is the basic difference in having 對ForeignKey
, DecimalField
等進行相同的操做。 數據庫
null=True
only null=True
僅null=True
blank=True
only blank=True
僅blank=True
null=True
, blank=True
null=True
, blank=True
in respect to different ( CharField
, ForeignKey
, ManyToManyField
, DateTimeField
) fields. 關於不一樣的字段( CharField
, ForeignKey
, ManyToManyField
, DateTimeField
)。 What are the advantages/disadvantages of using 1/2/3? 使用1/2/3有哪些優勢/缺點? django