From 75bb6ba96660e2a06e18d99120c05db2bb9fa9cc Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Wed, 2 Oct 2013 12:12:53 -0400 Subject: Fixed #10913 -- Documented how related_name affects QuerySet filtering Thanks neithere for the suggestion. --- docs/ref/models/fields.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'docs/ref') diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 248c630437..bcadf4d27a 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -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 ` for - a full explanation and example. Note that you must set this value - when defining relations on :ref:`abstract models - `; 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 ` for a full explanation + and example. Note that you must set this value when defining relations on + :ref:`abstract models `; and when you do so :ref:`some special syntax ` is available. If you'd prefer Django not to create a backwards relation, set -- cgit v1.3