From 5af17babb0f895cf129fdeee92548d2ac12e78e2 Mon Sep 17 00:00:00 2001 From: Carlton Gibson Date: Tue, 19 May 2020 20:27:05 +0200 Subject: [PATCH] Fixed #31591 -- Clarified "reverse" lookup name in making queries docs. --- docs/topics/db/queries.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt index c0e141ea8d..ed69ae5762 100644 --- a/docs/topics/db/queries.txt +++ b/docs/topics/db/queries.txt @@ -495,8 +495,9 @@ is ``'Beatles Blog'``:: This spanning can be as deep as you'd like. -It works backwards, too. To refer to a "reverse" relationship, use the -lowercase name of the model. +It works backwards, too. Whilst it :attr:`can be customized +<.ForeignKey.related_query_name>`, by default you refer to a "reverse" +relationship in a lookup using the lowercase name of the model. This example retrieves all ``Blog`` objects which have at least one ``Entry`` whose ``headline`` contains ``'Lennon'``::