def __init__(self, *args: Any, **kwargs: Any) -> None: kwargs["coerce"] = LocaleSelectField.coerce kwargs["choices"] = list(i18n.supported_app_locales()) super().__init__(*args, **kwargs)
def iter_choices(self): if not self.flags.required: yield (None, None, self.data is None) for locale, label in i18n.supported_app_locales(): yield (locale.language, label.capitalize(), locale == self.data)
def __init__(self, *args, **kwargs): kwargs["coerce"] = LocaleSelectField.coerce kwargs["choices"] = [ locale_info for locale_info in i18n.supported_app_locales() ] super().__init__(*args, **kwargs)
def __init__(self, *args, **kwargs): kwargs['coerce'] = LocaleSelectField.coerce kwargs['choices'] = (locale_info for locale_info in i18n.supported_app_locales()) super(LocaleSelectField, self).__init__(*args, **kwargs)
def __init__(self, *args, **kwargs): kwargs["coerce"] = LocaleSelectField.coerce kwargs["choices"] = [ locale_info for locale_info in i18n.supported_app_locales() ] super(LocaleSelectField, self).__init__(*args, **kwargs)