Skip to content

Commit

Permalink
Merge pull request #2363 from nheyning/22019_add_objects_doc
Browse files Browse the repository at this point in the history
Fixed #22019 -- added documentation on Model attributes
  • Loading branch information
evildmp committed Feb 23, 2014
2 parents b645be8 + e1d2a0b commit 4f7b7ef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/topics/db/models.txt
Expand Up @@ -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
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
Expand Down
2 changes: 2 additions & 0 deletions docs/topics/db/queries.txt
Expand Up @@ -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.

.. _retrieving-objects:

Retrieving objects
==================

Expand Down

0 comments on commit 4f7b7ef

Please sign in to comment.