summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJeffrey Yancey <jeffrey.yancey@gmail.com>2018-06-28 14:39:42 -0400
committerTim Graham <timograham@gmail.com>2018-06-28 19:35:01 -0400
commit2d6776ffe0b58f729f4372635b49a59da99ca206 (patch)
treef557d6ad9e1b71cc51a0e4ab1b0f8291b12999ba /docs
parentf4ef71c689b7bf3b0237d12c634fe5557f646a79 (diff)
Fixed #29458 -- Doc'd how related_query_name affects Model._meta.get_field().
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/meta.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/ref/models/meta.txt b/docs/ref/models/meta.txt
index 536f35d1d5..a02c357c40 100644
--- a/docs/ref/models/meta.txt
+++ b/docs/ref/models/meta.txt
@@ -33,8 +33,9 @@ Retrieving a single field instance of a model by name
``field_name`` can be the name of a field on the model, a field
on an abstract or inherited model, or a field defined on another
model that points to the model. In the latter case, the ``field_name``
- will be the ``related_name`` defined by the user or the name automatically
- generated by Django itself.
+ will be (in order of preference) the :attr:`~.ForeignKey.related_query_name`
+ set by the user, the :attr:`~.ForeignKey.related_name` set by the user, or
+ the name automatically generated by Django.
:attr:`Hidden fields <django.db.models.Field.hidden>` cannot be retrieved
by name.