diff --git a/tailbone/grids/filters.py b/tailbone/grids/filters.py index 3a497d13..e136aa21 100644 --- a/tailbone/grids/filters.py +++ b/tailbone/grids/filters.py @@ -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):