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:
Adrian Holovaty 2007-09-14 20:36:53 +00:00
parent 3da4c0ab92
commit 9cccf59db5
2 changed files with 17 additions and 0 deletions

View file

@ -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``
----------------