Example #1
0
 def __init__(self, *args, **kwargs):
     validate_timezone_max_length(MAX_TIMEZONE_LENGTH, zones.ALL_TIMEZONE_CHOICES)
     defaults = {
         "max_length": MAX_TIMEZONE_LENGTH,
         "default": settings.TIME_ZONE,
         "choices": zones.PRETTY_TIMEZONE_CHOICES
     }
     defaults.update(kwargs)
     return super(TimeZoneField, self).__init__(*args, **defaults)
Example #2
0
 def __init__(self, *args, **kwargs):
     validate_timezone_max_length(MAX_TIMEZONE_LENGTH, zones.ALL_TIMEZONE_CHOICES)
     defaults = {
         "max_length": MAX_TIMEZONE_LENGTH,
         "default": settings.TIME_ZONE,
         "choices": zones.PRETTY_TIMEZONE_CHOICES
     }
     defaults.update(kwargs)
     return super(TimeZoneField, self).__init__(*args, **defaults)