diff options
| author | Nikolaus Schlemm | 2013-05-19 09:25:02 +0200 |
|---|---|---|
| committer | Nikolaus Schlemm | 2013-05-19 09:25:02 +0200 |
| commit | c0f3a1c397a564ee78b3a656f14f7ff46b0d2b31 (patch) | |
| tree | b33a515f024a93051424318b2c6d1a291fee5198 /rest_framework/fields.py | |
| parent | 9454e23aa927931dcb7a6921c6ad238f6369e64e (diff) | |
| download | django-rest-framework-c0f3a1c397a564ee78b3a656f14f7ff46b0d2b31.tar.bz2 | |
Integrated status quo of grimborg's awesome humanize_field() for exposing field metadata via OPTIONS :)
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 d6db3ebe..a215e02b 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -136,7 +136,7 @@ def humanize_field(field): humanized = { 'type': humanize_field_type(field.__class__), 'required': getattr(field, 'required', False), - 'label': field.label, + 'label': getattr(field, 'label', None), } optional_attrs = ['read_only', 'help_text'] for attr in optional_attrs: |
