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
- id: C1 claim: A model is the definitive source of information about stored data. source: S1 evidence: "A model is the single, definitive source of information about your data."
- id: C2 claim: A model usually maps to one database table. source: S1 evidence: "Generally, each model maps to a single database table."
- id: C3 claim: Each model attribute represents a database field. source: S1 evidence: "Each attribute of the model represents a database field."
- id: C4 claim: Model.save writes the current instance. source: S2 evidence: "Save the current instance."
Sources
- [S1] Models. Django docs. https://docs.djangoproject.com/en/6.1/topics/db/models/ . License: BSD-3-Clause. Accessed 2026-11-10.
- [S2] django.db.models.base.Model. Django source. https://github.com/django/django/blob/stable/6.1.x/django/db/models/base.py . License: BSD-3-Clause. Accessed 2026-11-10.
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
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.},
}
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.