Fixed #22172 -- Allowed index_together to be a single list (rather than list of lists)..

Thanks EmilStenstrom for the suggestion.
This commit is contained in:
Anubhav Joshi 2014-03-02 00:36:15 +05:30 committed by Tim Graham
parent 3273bd7b25
commit bb2ca9fe6c
10 changed files with 67 additions and 19 deletions

View file

@ -340,6 +340,13 @@ Django quotes column and table names behind the scenes.
This list of fields will be indexed together (i.e. the appropriate
``CREATE INDEX`` statement will be issued.)
.. versionchanged:: 1.7
For convenience, ``index_together`` can be a single list when dealing with a single
set of fields::
index_together = ["pub_date", "deadline"]
``verbose_name``
----------------