diff options
| author | Kevin Christopher Henry <k@severian.com> | 2013-08-20 23:22:25 -0400 |
|---|---|---|
| committer | Preston Holmes <preston@ptone.com> | 2013-08-20 21:20:55 -0700 |
| commit | e7d4d41a30b4cf60690fe55e47b4e10403fc8b46 (patch) | |
| tree | 1f4762f02b73561ae522646627bd0dfdeca02fd1 /docs | |
| parent | 12d364a9b0b4bf820a68104a64ba312c7290518b (diff) | |
[1.6.x] Documentation - Noted that OneToOneField doesn't respect unique.
Added OneToOneField to the list of model fields for which the unique
argument isn't valid. (OneToOneFields are inherently unique, and if
the user supplies a value for unique it is ignored / overwritten.)
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/models/fields.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 7159ed8b70..fe83b54e1c 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -272,8 +272,8 @@ you try to save a model with a duplicate value in a :attr:`~Field.unique` field, a :exc:`django.db.IntegrityError` will be raised by the model's :meth:`~django.db.models.Model.save` method. -This option is valid on all field types except :class:`ManyToManyField` and -:class:`FileField`. +This option is valid on all field types except :class:`ManyToManyField`, +:class:`OneToOneField`, and :class:`FileField`. Note that when ``unique`` is ``True``, you don't need to specify :attr:`~Field.db_index`, because ``unique`` implies the creation of an index. |
