diff options
| author | Jonatas CD <jonatas.cd@gmail.com> | 2016-11-14 10:18:41 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-11-15 11:09:23 -0500 |
| commit | 9da45ff352db1d1b7c64e5c724e9b0b31822b967 (patch) | |
| tree | 95330b81f8171bc0388268b82d5bbdf7c64adb0d /docs | |
| parent | 364293529ba1106cd4605787a7f3d1b323b2a820 (diff) | |
Fixed #26985 -- Doc'd that ForeignKey.to_field reference must be unique.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/models/fields.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 6c9c5057c2..c50f09b401 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -1424,7 +1424,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 |
