django-models-7

Last Updated :
Discuss
Comments

In a Django model field, what does blank=True allow compared to null=True, and at which validation levels do they mainly apply?

blank=True allows empty values during form validation and null=True allows storing NULL in the database working at form level and database level

blank=True forces uniqueness and null=True sets default values working during migrations

blank=True stores empty values as NULL and null=True hides the field from forms working only at the database level

blank=True enables editing and null=True creates indexes working only in the admin interface

Tags:
Share your thoughts in the comments