diff options
author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-09-07 14:08:54 -0500 |
---|---|---|
committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-09-07 14:09:52 -0500 |
commit | 01edcf70f2911b1953b7789bda18d2498fc73bd0 (patch) | |
tree | eb09ca9df1f32470f73b72763b0e6f1abc948796 | |
parent | be9930d7bedc78486d5294a2914585e01c492385 (diff) | |
download | django-01edcf70f2911b1953b7789bda18d2498fc73bd0.tar.gz |
Fixed #20409 -- Clarified how unique_for_date works when USE_TZ is set.
-rw-r--r-- | docs/ref/models/fields.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index ad812f6504..2005e4a95c 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -291,7 +291,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 |