diff options
Diffstat (limited to 'rest_framework/fields.py')
| -rw-r--r-- | rest_framework/fields.py | 6 | 
1 files changed, 1 insertions, 5 deletions
| diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 1818e705..0c78b3fb 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -80,10 +80,6 @@ def set_value(dictionary, keys, value):      dictionary[keys[-1]] = value -def field_name_to_label(field_name): -    return field_name.replace('_', ' ').capitalize() - -  class SkipField(Exception):      pass @@ -162,7 +158,7 @@ class Field(object):          # `self.label` should deafult to being based on the field name.          if self.label is None: -            self.label = field_name_to_label(self.field_name) +            self.label = field_name.replace('_', ' ').capitalize()          # self.source should default to being the same as the field name.          if self.source is None: | 
