Exemple #1
0
    def iter_choices(self):
        if not self.flags.required:
            yield (None, None, self.data is None)

        for tz, label in i18n.timezones_choices():
            yield (tz.zone, label, tz == self.data)
Exemple #2
0
    def iter_choices(self):
        if not self.flags.required:
            yield (None, None, self.data is None)

        for tz, label in i18n.timezones_choices():
            yield (tz.zone, label, tz == self.data)
Exemple #3
0
 def __init__(self, *args: Any, **kwargs: Any) -> None:
     kwargs["coerce"] = babel.dates.get_timezone
     kwargs["choices"] = list(i18n.timezones_choices())
     super().__init__(*args, **kwargs)
Exemple #4
0
 def __init__(self, *args, **kwargs):
     kwargs["coerce"] = babel.dates.get_timezone
     kwargs["choices"] = [tz_info for tz_info in i18n.timezones_choices()]
     super().__init__(*args, **kwargs)
Exemple #5
0
 def __init__(self, *args, **kwargs):
     kwargs['coerce'] = babel.dates.get_timezone
     kwargs['choices'] = (tz_info for tz_info in i18n.timezones_choices())
     super(TimezoneField, self).__init__(*args, **kwargs)
Exemple #6
0
 def __init__(self, *args: Any, **kwargs: Any) -> None:
     kwargs["coerce"] = babel.dates.get_timezone
     kwargs["choices"] = [tz_info for tz_info in i18n.timezones_choices()]
     super().__init__(*args, **kwargs)
Exemple #7
0
 def __init__(self, *args, **kwargs):
     kwargs["coerce"] = babel.dates.get_timezone
     kwargs["choices"] = [tz_info for tz_info in i18n.timezones_choices()]
     super(TimezoneField, self).__init__(*args, **kwargs)
Exemple #8
0
 def __init__(self, *args, **kwargs):
   kwargs['coerce'] = babel.dates.get_timezone
   kwargs['choices'] = (tz_info for tz_info in i18n.timezones_choices())
   super(TimezoneField, self).__init__(*args, **kwargs)