0PricingLogin
Django Academy · Lesson

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

  1. Defining a Model Class
  2. Choosing Field Types
  3. Field Options: null, blank, default
  4. str and the Meta Class
← Back to Django Academy