summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-09-07 14:08:54 -0500
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-09-07 14:08:54 -0500
commite192739b3e3209a371a5d0f5f05fd083e88259f2 (patch)
tree188877cd053a9f02f60f95d6a45bb9e626ce1d1e /docs/ref
parent31e16c1343cf0d0d65e9d6e86c61bbcd7bd5fd76 (diff)
Fixed #20409 -- Clarified how unique_for_date works when USE_TZ is set.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/fields.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index dd0d025ab2..1e3476166f 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -300,7 +300,9 @@ For example, if you have a field ``title`` that has
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.
+portion of the field will be considered. Besides, when :setting:`USE_TZ` is
+``True``, the check will be performed in the :ref:`current time zone
+<default-current-time-zone>` at the time the object gets saved.
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