示例#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}
示例#2
0
文件: simple.py 项目: OmeGak/indico
 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}
示例#3
0
 def wtf_field_kwargs(self):
     return {'choices': sorted(CountryHolder.getCountries().items(), key=itemgetter(1))}
示例#4
0
 def wtf_field_kwargs(self):
     return {'choices': CountryHolder.getCountries().items()}
示例#5
0
 def get_friendly_data(self, registration_data):
     return CountryHolder.getCountries()[registration_data.data] if registration_data.data else ''
示例#6
0
 def wtf_field_kwargs(self):
     return {'choices': CountryHolder.getCountries().items()}