db.models.Field.auto_created
  • References/Python/Django/API/Models/Model field reference

Field.auto_created Boolean flag that indicates if the field was automatically created, such as the OneToOneField

2025-01-10 15:47:30
db.models.Field.null
  • References/Python/Django/API/Models/Model field reference

Field.null If True, Django will store empty values as NULL in the database. Default is False

2025-01-10 15:47:30
db.models.ImageField.height_field
  • References/Python/Django/API/Models/Model field reference

ImageField.height_field Name of a model field which will be auto-populated with the height of the image each time the model

2025-01-10 15:47:30
db.models.ForeignKey.swappable
  • References/Python/Django/API/Models/Model field reference

ForeignKey.swappable Controls the migration framework’s reaction if this ForeignKey is pointing at a swappable

2025-01-10 15:47:30
db.models.CASCADE
  • References/Python/Django/API/Models/Model field reference

CASCADE [source] Cascade deletes. Django emulates the behavior of the SQL constraint ON DELETE

2025-01-10 15:47:30
db.models.SET_NULL
  • References/Python/Django/API/Models/Model field reference

SET_NULL [source] Set the ForeignKey null; this is only possible if null

2025-01-10 15:47:30
db.models.Field.editable
  • References/Python/Django/API/Models/Model field reference

Field.editable If False, the field will not be displayed in the admin or any other

2025-01-10 15:47:30
db.models.Field.unique_for_month
  • References/Python/Django/API/Models/Model field reference

Field.unique_for_month Like unique_for_date, but requires the field to be unique with respect to the month.

2025-01-10 15:47:30
db.models.ImageField.width_field
  • References/Python/Django/API/Models/Model field reference

ImageField.width_field Name of a model field which will be auto-populated with the width of the image each time the model instance

2025-01-10 15:47:30
db.models.DateField.auto_now_add
  • References/Python/Django/API/Models/Model field reference

DateField.auto_now_add Automatically set the field to now when the object is first created. Useful for creation of timestamps

2025-01-10 15:47:30