diff options
| author | Carlton Gibson <carlton@noumenal.es> | 2020-05-19 20:27:05 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-05-19 20:27:29 +0200 |
| commit | 844e0591f9591854a0411fb8d90282737f17c40c (patch) | |
| tree | ce54fef2340a5f29c8740e08475af7eb39ef54cd /docs | |
| parent | 7ee19a0f78835c62c89cb3f3ee89135ea17a1bf9 (diff) | |
[3.1.x] Fixed #31591 -- Clarified "reverse" lookup name in making queries docs.
Backport of 5af17babb0f895cf129fdeee92548d2ac12e78e2 from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/db/queries.txt | 5 |
1 files 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'``:: |
