mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
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:
parent
3273bd7b25
commit
bb2ca9fe6c
10 changed files with 67 additions and 19 deletions
|
@ -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``
|
||||
----------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue