Skip links

Jody Boucher

Software Engineer


1 post tagged with how-to

Django How-To: Using the null and blank field options

Django logo

Models typically make up the foundation of most Django projects. They are the primary abstraction for managing the data/state that is the core of most "applications". Models not only define the structure of the database, each model is the mechanism for accessing and modifying the data stored in the database table represented by the model. Models are also generally responsible for any behaviors of the data and for validating data to protect the quality of the data in the database.

The most obvious part of any Django model is the list of fields. Each field in a model is related to a column or attribute in the database table associated with the model. Fields have two options that can be confusing to many developers that are new to the framework. The two options are null and blank. Although the two options might seem to address similar functionality, they are used for very different purposes.

[Read more…]about Django How-To: Using the null and blank field options