← All notes

Django models as the source of stored data

Answer: In Django, a model is the definitive source of information about the data you store. It holds the fields and behaviors of that data. Each model usually maps to one database table.

Python classes

Each model is a Python class that subclasses Model. Attributes on the model stand for database fields.

Saving

The model class also defines how an instance is written. save writes the current instance; a subclass may override that method to control the saving process. Instances can also report the names of deferred fields.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources and notices: Django documentation and source (django/django): Copyright (c) Django Software Foundation and individual contributors; BSD-3-Clause (https://raw.githubusercontent.com/django/django/stable/6.1.x/LICENSE). Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Django docs, Models, BSD-3-Clause (django/django); Django source, django.db.models.base.Model, BSD-3-Clause (django/django). Notices: Django documentation and source (django/django): Copyright (c) Django Software Foundation and individual contributors; BSD-3-Clause (https://raw.githubusercontent.com/django/django/stable/6.1.x/LICENSE).

Cite this

Permanent ID: iil:note:7j7n8632

iinventedlight. 2026. "Django models as the source of stored data." iinventedlight Library, iil:note:7j7n8632, version of 2026-11-10. https://iinventedlight.com/library/notes/django-models/. License: CC-BY-4.0.

@misc{iil_note_7j7n8632,
  author = {{iinventedlight}},
  title = {{Django models as the source of stored data}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-10},
  url = {https://iinventedlight.com/library/notes/django-models/},
  note = {Permanent ID iil:note:7j7n8632. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/django-models.md.