diff options
| author | Tim Graham <timograham@gmail.com> | 2013-10-02 12:12:53 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-10-02 12:13:44 -0400 |
| commit | 06b149e220f98cd643a4445db1b5719daac0d56f (patch) | |
| tree | 9b356a657abc47117bf82f43987cf26c4952bac3 /docs/ref/models | |
| parent | 9b89fcc0b0c85dad5034b048e436f06a981f28e8 (diff) | |
[1.6.x] Fixed #10913 -- Documented how related_name affects QuerySet filtering
Thanks neithere for the suggestion.
Backport of 75bb6ba966 from master
Diffstat (limited to 'docs/ref/models')
| -rw-r--r-- | docs/ref/models/fields.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 2005e4a95c..a8f1eaa917 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -1075,10 +1075,11 @@ define the details of how the relation works. .. attribute:: ForeignKey.related_name The name to use for the relation from the related object back to this one. - See the :ref:`related objects documentation <backwards-related-objects>` for - a full explanation and example. Note that you must set this value - when defining relations on :ref:`abstract models - <abstract-base-classes>`; and when you do so + It's also the default value for :attr:`related_query_name` (the name to use + for the reverse filter name from the target model). See the :ref:`related + objects documentation <backwards-related-objects>` for a full explanation + and example. Note that you must set this value when defining relations on + :ref:`abstract models <abstract-base-classes>`; and when you do so :ref:`some special syntax <abstract-related-name>` is available. If you'd prefer Django not to create a backwards relation, set |
