diff options
| author | Daniele Procida <daniele@vurt.org> | 2014-02-23 17:35:43 +0100 |
|---|---|---|
| committer | Daniele Procida <daniele@vurt.org> | 2014-02-23 17:35:43 +0100 |
| commit | 4f7b7ef6837ee8e385785b164534fd5bc6c38e9f (patch) | |
| tree | 2b0e4aba1a5f0f1e44e3eeba1b3df5b8bb50f2b8 /docs | |
| parent | b645be80e99709c8b1f9b3d1c26e99e22fdca08b (diff) | |
| parent | e1d2a0bd046258100f1dff9ef3718829c36b5850 (diff) | |
Merge pull request #2363 from nheyning/22019_add_objects_doc
Fixed #22019 -- added documentation on Model attributes
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/db/models.txt | 13 | ||||
| -rw-r--r-- | docs/topics/db/queries.txt | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt index 5039bbd2d1..a8445a2cf5 100644 --- a/docs/topics/db/models.txt +++ b/docs/topics/db/models.txt @@ -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 diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt index f53d1a9998..66118631e0 100644 --- a/docs/topics/db/queries.txt +++ b/docs/topics/db/queries.txt @@ -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 ================== |
