mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
[2.2.x] Fixed #30505 -- Doc'd how changes in the order of Field.choices affect migrations.
Backport of 5248abe9b0
from master
This commit is contained in:
parent
ed3dc5119b
commit
d6d65c1e87
3 changed files with 14 additions and 7 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue