summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorCaio Ariede <caio.ariede@gmail.com>2019-05-29 09:14:32 -0300
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-06-04 14:57:08 +0200
commitd6d65c1e87d0da52e43d6359290a7b3f77367576 (patch)
treee7127444ecdf9aa3b091da493a1092775a982dfa /docs/topics
parented3dc5119bd460ee28d6593283199d4b54f4c072 (diff)
[2.2.x] Fixed #30505 -- Doc'd how changes in the order of Field.choices affect migrations.
Backport of 5248abe9b0425c1fc989c60a55860cdb4d135bcf from master
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/db/models.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt
index 90edd682ee..4aeb318f7b 100644
--- a/docs/topics/db/models.txt
+++ b/docs/topics/db/models.txt
@@ -154,7 +154,7 @@ ones:
<Field.blank>`, the field will be required.
:attr:`~Field.choices`
- An :term:`iterable` of 2-tuples to use as choices for this field. If this
+ A :term:`sequence` of 2-tuples to use as choices for this field. If this
is given, the default form widget will be a select box instead of the
standard text field and will limit choices to the choices given.
@@ -168,6 +168,9 @@ ones:
('GR', 'Graduate'),
]
+ .. note::
+ A new migration is created each time the order of ``choices`` changes.
+
The first element in each tuple is the value that will be stored in the
database. The second element is displayed by the field's form widget.