mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #5460 -- unique_together now accepts a single tuple for convenience. Thanks, Deryck Hodge
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6213 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
3da4c0ab92
commit
9cccf59db5
2 changed files with 17 additions and 0 deletions
|
@ -1226,6 +1226,13 @@ together. It's used in the Django admin and is enforced at the database
|
|||
level (i.e., the appropriate ``UNIQUE`` statements are included in the
|
||||
``CREATE TABLE`` statement).
|
||||
|
||||
**New in Django development version**
|
||||
|
||||
For convenience, unique_together can be a single list when dealing
|
||||
with a single set of fields::
|
||||
|
||||
unique_together = ("driver", "restaurant")
|
||||
|
||||
``verbose_name``
|
||||
----------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue