summaryrefslogtreecommitdiff
path: root/docs/ref/models
diff options
context:
space:
mode:
authorJonatas CD <jonatas.cd@gmail.com>2016-11-14 10:18:41 +0100
committerTim Graham <timograham@gmail.com>2016-11-15 11:21:58 -0500
commitaf0f01558bb53553a1a7cd24f8121163c0069c85 (patch)
treecdd22d059c71e9c645073a17c88c2fe39b1d4ad7 /docs/ref/models
parent65cdded2c9ab9987eae117de37a24c752c9ba185 (diff)
[1.10.x] Fixed #26985 -- Doc'd that ForeignKey.to_field reference must be unique.
Backport of 9da45ff352db1d1b7c64e5c724e9b0b31822b967 from master
Diffstat (limited to 'docs/ref/models')
-rw-r--r--docs/ref/models/fields.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index 8fe1d90dea..250311d9e6 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -1426,7 +1426,8 @@ The possible values for :attr:`~ForeignKey.on_delete` are found in
.. attribute:: ForeignKey.to_field
The field on the related object that the relation is to. By default, Django
- uses the primary key of the related object.
+ uses the primary key of the related object. If you reference a different
+ field, that field must have ``unique=True``.
.. attribute:: ForeignKey.db_constraint