[ Django ](https://www.djangoproject.com/)

The web framework for perfectionists with deadlines.

__ Menu

Toggle theme (current theme: auto)

Toggle theme (current theme: light)

Toggle theme (current theme: dark)

Toggle Light / Dark / Auto color theme

  * [ Overview ](https://www.djangoproject.com/start/overview/)
  * [ Download ](https://www.djangoproject.com/download/)
  * [ Documentation ](https://docs.djangoproject.com/)
  * [ News ](https://www.djangoproject.com/weblog/)
  * [ Community ](https://www.djangoproject.com/community/)
  * [ Code ](https://github.com/django/django)
  * [ Issues ](https://code.djangoproject.com/)
  * [ About ](https://www.djangoproject.com/foundation/)
  * [ ♥ Donate ](https://www.djangoproject.com/fundraising/)
  * Toggle theme (current theme: auto) 

Toggle theme (current theme: light)

Toggle theme (current theme: dark)

Toggle Light / Dark / Auto color theme

#  [ Documentation ](https://docs.djangoproject.com/en/3.2/)

Search:  __ Search

  * [ Getting Help  ](https://docs.djangoproject.com/en/3.2/faq/help/)

  * [ el ](https://docs.djangoproject.com/el/3.2/topics/db/models/)
  * [ es ](https://docs.djangoproject.com/es/3.2/topics/db/models/)
  * [ fr ](https://docs.djangoproject.com/fr/3.2/topics/db/models/)
  * [ id ](https://docs.djangoproject.com/id/3.2/topics/db/models/)
  * [ it ](https://docs.djangoproject.com/it/3.2/topics/db/models/)
  * [ ja ](https://docs.djangoproject.com/ja/3.2/topics/db/models/)
  * [ ko ](https://docs.djangoproject.com/ko/3.2/topics/db/models/)
  * [ pl ](https://docs.djangoproject.com/pl/3.2/topics/db/models/)
  * [ pt-br ](https://docs.djangoproject.com/pt-br/3.2/topics/db/models/)
  * [ zh-hans ](https://docs.djangoproject.com/zh-hans/3.2/topics/db/models/)
  * Language: **en**

  * [ 1.8 ](https://docs.djangoproject.com/en/1.8/topics/db/models/)
  * [ 1.10 ](https://docs.djangoproject.com/en/1.10/topics/db/models/)
  * [ 1.11 ](https://docs.djangoproject.com/en/1.11/topics/db/models/)
  * [ 2.0 ](https://docs.djangoproject.com/en/2.0/topics/db/models/)
  * [ 2.1 ](https://docs.djangoproject.com/en/2.1/topics/db/models/)
  * [ 2.2 ](https://docs.djangoproject.com/en/2.2/topics/db/models/)
  * [ 3.0 ](https://docs.djangoproject.com/en/3.0/topics/db/models/)
  * [ 3.1 ](https://docs.djangoproject.com/en/3.1/topics/db/models/)
  * [ 4.0 ](https://docs.djangoproject.com/en/4.0/topics/db/models/)
  * [ 4.1 ](https://docs.djangoproject.com/en/4.1/topics/db/models/)
  * [ 4.2 ](https://docs.djangoproject.com/en/4.2/topics/db/models/)
  * [ 5.0 ](https://docs.djangoproject.com/en/5.0/topics/db/models/)
  * [ dev ](https://docs.djangoproject.com/en/dev/topics/db/models/)
  * Documentation version: **3.2**

  * __

#  Models  ¶

A model is the single, definitive source of information about your data. It
contains the essential fields and behaviors of the data you’re storing.
Generally, each model maps to a single database table.

The basics:

  * Each model is a Python class that subclasses [ ` django.db.models.Model  ` ](../../../ref/models/instances/#django.db.models.Model "django.db.models.Model") . 
  * Each attribute of the model represents a database field. 
  * With all of this, Django gives you an automatically-generated database-access API; see [ Making queries  ](../queries/) .