mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Merge pull request #1039 from cannona/master
Clarified what unique_for_date considers
This commit is contained in:
commit
8035533557
2 changed files with 4 additions and 0 deletions
|
@ -287,6 +287,9 @@ For example, if you have a field ``title`` that has
|
|||
``unique_for_date="pub_date"``, then Django wouldn't allow the entry of two
|
||||
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.
|
||||
|
||||
``unique_for_month``
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue