diff options
| author | Ian Foote | 2013-11-27 11:00:15 +0000 |
|---|---|---|
| committer | Ian Foote | 2013-11-27 11:06:42 +0000 |
| commit | 8d09f56061a3ee82e31fb646cfa84484ae525f88 (patch) | |
| tree | c5e51e6b5bac4cc9b0b919022fe26e57c450ed9a /rest_framework/fields.py | |
| parent | 2484fc914159571a3867c2dae2d9b51314f4581d (diff) | |
| download | django-rest-framework-8d09f56061a3ee82e31fb646cfa84484ae525f88.tar.bz2 | |
Add unittests for ChoiceField metadata.
Rename 'name' to 'display_name'.
Diffstat (limited to 'rest_framework/fields.py')
| -rw-r--r-- | rest_framework/fields.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 1657e57f..0fca718e 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -516,7 +516,7 @@ class ChoiceField(WritableField): def metadata(self): data = super(ChoiceField, self).metadata() - data['choices'] = [{'value': v, 'name': n} for v, n in self.choices] + data['choices'] = [{'value': v, 'display_name': n} for v, n in self.choices] return data def validate(self, value): |
