示例#1
0
 def clean(self, value, record, config):
     value = super(CountryProperty, self).clean(value, record, config)
     return parse_country(value) or value
示例#2
0
 def normalize_value(self, value):
     return parse_country(value)
示例#3
0
 def add_country(self, country):
     country = parse_country(country)
     if country is None:
         return
     if is_country_code(country) and country not in self._countries:
         self._countries.append(country)