Django Model Field Options: blank

By: Dusty Arlia
Published on Sunday, March 9, 2014, 10:57 AM
Last Updated on Sunday, July 05, 2015 at 7:01 PM
Total Updates: 2

The blank field option determines whether a field in a form can have an empty value. This field option is used in form validation. The Django model field is allowed to be blank if the blank field option is set to True. Its default is False.

The blank field option is different than the null field option. null is database-related, whereas blank is validation-related. If a field has blank=True, form validation will allow entry of an empty value. If a field has blank=False, the field will be required.