Add more context to the ChoiceField metadata.

This commit is contained in:
Ian Foote 2013-11-26 17:10:16 +00:00
parent a38d9d5b24
commit 2484fc9141

View File

@ -516,7 +516,7 @@ class ChoiceField(WritableField):
def metadata(self): def metadata(self):
data = super(ChoiceField, self).metadata() data = super(ChoiceField, self).metadata()
data['choices'] = self.choices data['choices'] = [{'value': v, 'name': n} for v, n in self.choices]
return data return data
def validate(self, value): def validate(self, value):