Example #1
0
 def choices_for_condition_field(self, is_multichoice):
     condition_choices = {}
     for key, value in CONDITIONS.items():
         is_equals_option = (key == 'EQUALS_OPTION')
         if (is_equals_option and is_multichoice) or (not is_equals_option and not is_multichoice):
             condition_choices[key] = value
     return sorted(condition_choices.items())
Example #2
0
 def choices_for_condition_field(self, is_multichoice):
     condition_choices = {}
     for key, value in CONDITIONS.items():
         is_equals_option = (key == 'EQUALS_OPTION')
         if (is_equals_option
                 and is_multichoice) or (not is_equals_option
                                         and not is_multichoice):
             condition_choices[key] = value
     return sorted(condition_choices.items())
Example #3
0
def condition_text(key):
    value = CONDITIONS.get(key, "")
    return value
Example #4
0
def condition_text(key):
    value = CONDITIONS.get(key, "")
    return value