Beispiel #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}
Beispiel #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}
Beispiel #3
0
 def wtf_field_kwargs(self):
     return {'choices': sorted(CountryHolder.getCountries().items(), key=itemgetter(1))}
Beispiel #4
0
 def wtf_field_kwargs(self):
     return {'choices': CountryHolder.getCountries().items()}
Beispiel #5
0
 def get_friendly_data(self, registration_data):
     return CountryHolder.getCountries()[registration_data.data] if registration_data.data else ''
Beispiel #6
0
 def wtf_field_kwargs(self):
     return {'choices': CountryHolder.getCountries().items()}