summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAnubhav Joshi <anubhav9042@gmail.com>2014-03-02 00:36:15 +0530
committerTim Graham <timograham@gmail.com>2014-03-01 15:44:42 -0500
commitbb2ca9fe6cdd490526b44b30f207c8f743bfaa84 (patch)
tree8e448c5f136ad0160d062bc65e23bc107cee656c /docs
parent3273bd7b254680a5b241e2fdbc3196956b2b44e8 (diff)
Fixed #22172 -- Allowed index_together to be a single list (rather than list of lists)..
Thanks EmilStenstrom for the suggestion.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/options.txt7
-rw-r--r--docs/releases/1.7.txt3
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt
index 3fe7526fa2..ef56b251a0 100644
--- a/docs/ref/models/options.txt
+++ b/docs/ref/models/options.txt
@@ -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``
----------------
diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt
index 882fa69dee..f9400032e5 100644
--- a/docs/releases/1.7.txt
+++ b/docs/releases/1.7.txt
@@ -642,6 +642,9 @@ Models
an error (before that, it would either result in a database error or
incorrect data).
+* You can use a single list for :attr:`~django.db.models.Options.index_together`
+ (rather than a list of lists) when specifying a single set of fields.
+
Signals
^^^^^^^