1
0
mirror of https://github.com/django/django.git synced 2025-04-15 21:04:36 +00:00

[3.1.x] Fixed #31591 -- Clarified "reverse" lookup name in making queries docs.

Backport of 5af17babb0f895cf129fdeee92548d2ac12e78e2 from master
This commit is contained in:
Carlton Gibson 2020-05-19 20:27:05 +02:00 committed by Mariusz Felisiak
parent 7ee19a0f78
commit 844e0591f9

View File

@ -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'``::