Ejemplo n.º 1
0
 def get_choices(choices):
     for value, help_text in choices:
         if value[0] != "-":
             name = convert_choice_name(value) + "_ASC"
         else:
             name = convert_choice_name(value[1:]) + "_DESC"
         description = help_text
         yield name, value, description
Ejemplo n.º 2
0
 def get_choices(choices):
     for value, help_text in choices:
         if value:
             name = convert_choice_name(value)
             description = help_text
             yield name, value, description