summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-05-28 09:56:14 -0400
committerTim Graham <timograham@gmail.com>2013-05-28 10:04:07 -0400
commitd321d1acf0fdf00247e78b9686be84c18b35b9d8 (patch)
treeb24487f9618fe9d4259db3c2d4089f5bdc02fb4a /docs
parent8365d76da01af1d4391cba32d62178791d074b06 (diff)
Fixed #20228 - Documented unique_for_date and exclude behavior.
Thanks Deepak Thukral for the patch.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/fields.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index f61ebe6684..8146dfd341 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -293,7 +293,12 @@ records with the same ``title`` and ``pub_date``.
Note that if you set this to point to a :class:`DateTimeField`, only the date
portion of the field will be considered.
-This is enforced by model validation but not at the database level.
+This is enforced by :meth:`Model.validate_unique()` during model validation
+but not at the database level. If any :attr:`~Field.unique_for_date` constraint
+involves fields that are not part of a :class:`~django.forms.ModelForm` (for
+example, if one of the fields is listed in ``exclude`` or has
+:attr:`editable=False<Field.editable>`), :meth:`Model.validate_unique()` will
+skip validation for that particular constraint.
``unique_for_month``
--------------------