Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

src/c/o/commcare-hq-HEAD/corehq/apps/reminders/forms.py   commcare-hq(Download)
from corehq.apps.groups.models import Group
from corehq.apps.hqwebapp.crispy import BootstrapMultiField, FieldsetAccordionGroup, HiddenFieldWithErrors, FieldWithHelpBubble
from .models import (
    REPEAT_SCHEDULE_INDEFINITELY,
    CaseReminderEvent,
 
MATCH_TYPE_DISPLAY_CHOICES = (
    (MATCH_EXACT, "equals"),
    (MATCH_ANY_VALUE, "exists"),
    (MATCH_REGEX, "matches the regular expression")
    def clean_recipient_case_match_value(self):
        if self.cleaned_data.get("recipient") == RECIPIENT_SUBCASE and self.cleaned_data.get("recipient_case_match_type") in [MATCH_EXACT, MATCH_REGEX]:
            value = self.cleaned_data.get("recipient_case_match_value")
            if value is not None:
                value = value.strip()
MATCH_TYPE_CHOICES = (
    (MATCH_ANY_VALUE, "exists."),
    (MATCH_EXACT, "equals"),
    (MATCH_REGEX, "matches regular expression"),
)