Improve docs a bit, for GridFilter.set_choices()
This commit is contained in:
parent
ace18e86ff
commit
43f366d955
|
@ -192,6 +192,17 @@ class GridFilter(object):
|
|||
"""
|
||||
Set the value choices for the filter, post-construction. Note that
|
||||
this also will set the value renderer to one which supports choices.
|
||||
|
||||
:param choices: A collection of "choices" for the filter. This must be
|
||||
in one of the following formats:
|
||||
|
||||
* simple list, each value of which should be a string, which is
|
||||
assumed to be able to serve as both key and value (ordering of
|
||||
choices will be preserved)
|
||||
* simple dict, keys and values of which will define the choices
|
||||
(note that the final choices will be sorted by key!)
|
||||
* OrderedDict, keys and values of which will define the choices
|
||||
(ordering of choices will be preserved)
|
||||
"""
|
||||
# first must normalize choices
|
||||
if isinstance(choices, OrderedDict):
|
||||
|
|
Loading…
Reference in a new issue