Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[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.)
  • Loading branch information...
commit e7d4d41a30b4cf60690fe55e47b4e10403fc8b46 1 parent 12d364a
Kevin Christopher Henry authored ptone committed

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  docs/ref/models/fields.txt
4  docs/ref/models/fields.txt
@@ -272,8 +272,8 @@ you try to save a model with a duplicate value in a :attr:`~Field.unique`
272 272
 field, a :exc:`django.db.IntegrityError` will be raised by the model's
273 273
 :meth:`~django.db.models.Model.save` method.
274 274
 
275  
-This option is valid on all field types except :class:`ManyToManyField` and
276  
-:class:`FileField`.
  275
+This option is valid on all field types except :class:`ManyToManyField`,
  276
+:class:`OneToOneField`, and :class:`FileField`.
277 277
 
278 278
 Note that when ``unique`` is ``True``, you don't need to specify
279 279
 :attr:`~Field.db_index`, because ``unique`` implies the creation of an index.

0 notes on commit e7d4d41

Please sign in to comment.
Something went wrong with that request. Please try again.