Exemplo n.º 1
0
 def unprocess_field_data(cls, versioned_data, unversioned_data):
     choices = sorted([{
         'caption': v,
         'countryKey': k
     } for k, v in CountryHolder.getCountries().iteritems()],
                      key=itemgetter('caption'))
     return {'choices': choices}
Exemplo n.º 2
0
 def unprocess_field_data(cls, versioned_data, unversioned_data):
     choices = sorted([{'caption': v, 'countryKey': k} for k, v in CountryHolder.getCountries().iteritems()],
                      key=itemgetter('caption'))
     return {'choices': choices}
Exemplo n.º 3
0
 def wtf_field_kwargs(self):
     return {'choices': sorted(CountryHolder.getCountries().items(), key=itemgetter(1))}
Exemplo n.º 4
0
 def wtf_field_kwargs(self):
     return {'choices': CountryHolder.getCountries().items()}
Exemplo n.º 5
0
 def get_friendly_data(self, registration_data):
     return CountryHolder.getCountries()[registration_data.data] if registration_data.data else ''
Exemplo n.º 6
0
 def wtf_field_kwargs(self):
     return {'choices': CountryHolder.getCountries().items()}