mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 03:23:59 +03:00
Update fields.py
modify to_choices_dict document
This commit is contained in:
parent
43c7af0bb5
commit
c868378c71
|
@ -142,7 +142,7 @@ def to_choices_dict(choices):
|
|||
|
||||
to_choices_dict([1]) -> {1: 1}
|
||||
to_choices_dict([(1, '1st'), (2, '2nd')]) -> {1: '1st', 2: '2nd'}
|
||||
to_choices_dict([('Group', ((1, '1st'), 2))]) -> {'Group': {1: '1st', 2: '2nd'}}
|
||||
to_choices_dict([('Group', ((1, '1st'), 2))]) -> {'Group': {1: '1st', 2: '2'}}
|
||||
"""
|
||||
# Allow single, paired or grouped choices style:
|
||||
# choices = [1, 2, 3]
|
||||
|
|
Loading…
Reference in New Issue
Block a user