added documentation on Model attributes
This commit is contained in:
parent
173aa51997
commit
e1d2a0bd04
|
@ -663,6 +663,19 @@ Meta`` to a model is completely optional.
|
||||||
A complete list of all possible ``Meta`` options can be found in the :doc:`model
|
A complete list of all possible ``Meta`` options can be found in the :doc:`model
|
||||||
option reference </ref/models/options>`.
|
option reference </ref/models/options>`.
|
||||||
|
|
||||||
|
.. _model-attributes:
|
||||||
|
|
||||||
|
Model attributes
|
||||||
|
================
|
||||||
|
|
||||||
|
:attr:`~objects`
|
||||||
|
The most important attribute of a model is the
|
||||||
|
:class:`~django.db.models.Manager`, which is the interface through which
|
||||||
|
database query operations are provided to Django models and is used to
|
||||||
|
:ref:`retrieve the instances <retrieving-objects>` from the database. If no
|
||||||
|
custom Manager is defined, the default name is ``objects``. Managers are
|
||||||
|
only accessible via model classes, not the model instances.
|
||||||
|
|
||||||
.. _model-methods:
|
.. _model-methods:
|
||||||
|
|
||||||
Model methods
|
Model methods
|
||||||
|
|
|
@ -129,6 +129,8 @@ go, include multiple arguments in the call to
|
||||||
|
|
||||||
Django will complain if you try to assign or add an object of the wrong type.
|
Django will complain if you try to assign or add an object of the wrong type.
|
||||||
|
|
||||||
|
.. _retrieving-objects:
|
||||||
|
|
||||||
Retrieving objects
|
Retrieving objects
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue