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.query.QuerySet.create()
  • References/Python/Django/API/Models/QuerySet API reference

create(**kwargs) A convenience method for creating an object and saving it all in one step. Thus:

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.options.Options.get_field()
  • References/Python/Django/API/Models/Model _meta API

Options.get_field(field_name) [source] Returns the field instance given a name of a field

2025-01-10 15:47:30
db.models.Lookup.process_lhs()
  • References/Python/Django/API/Models/Lookup API reference

process_lhs(compiler, connection, lhs=None) [source] Returns a tuple (lhs_string, lhs_params)

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.Options.label_lower
  • References/Python/Django/API/Models/Model Meta options

Options.label_lower New in Django 1.9. Representation

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