summaryrefslogtreecommitdiff
path: root/docs/ref/models
diff options
context:
space:
mode:
authorKevin Christopher Henry <k@severian.com>2013-08-20 23:22:25 -0400
committerAndrew Godwin <andrew@aeracode.org>2013-08-21 22:32:04 +0100
commit7775ced938da18066da73adba322be1a49be3e6d (patch)
treeab31190e06009be5ad9a0efc3b22ff4ca51b1dad /docs/ref/models
parentc5fbd1636203e697c214dcad54e4f3db1d7c9685 (diff)
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/ref/models')
-rw-r--r--docs/ref/models/fields.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index a9673ce3d2..6ef487e90f 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -281,8 +281,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.