Field Options: null, blank, default
Control what values a column accepts.
Tune Each Field
Beyond the type, every field accepts options that control what values it will accept and how it behaves.
null Is About the Database
The null option decides whether the database column may store NULL. With null=True, the column can be empty in the database.
summary = models.TextField(null=True)All lessons in this course
- Defining a Model Class
- Choosing Field Types
- Field Options: null, blank, default
- str and the Meta Class