When we add a database field in django we generally write:
models.CharField(max_length=100, null=True, blank=True)
The same is done with ForeignKey
, DecimalField
etc. What is the basic difference in having
null=True
onlyblank=True
onlynull=True
,blank=True
in respect to different (CharField
, ForeignKey
, ManyToManyField
, DateTimeField
) fields. What are the advantages/disadvantages of using 1/2/3?