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:21:58 -0500 |
| commit | af0f01558bb53553a1a7cd24f8121163c0069c85 (patch) | |
| tree | cdd22d059c71e9c645073a17c88c2fe39b1d4ad7 /docs | |
| parent | 65cdded2c9ab9987eae117de37a24c752c9ba185 (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')
| -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 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 |
