Fixed #10913 -- Documented how related_name affects QuerySet filtering

Thanks neithere for the suggestion.
This commit is contained in:
Tim Graham 2013-10-02 12:12:53 -04:00
parent e1b7723817
commit 75bb6ba966
2 changed files with 13 additions and 10 deletions

View file

@ -1078,10 +1078,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