diff options
| author | Tom Christie | 2014-09-18 11:20:56 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-09-18 11:20:56 +0100 |
| commit | 5b7e4af0d657a575cb15eea85a63a7100c636085 (patch) | |
| tree | 798e30ea326324151f4e87319156fb2b35147792 /rest_framework/fields.py | |
| parent | c0155fd9dc654dc5932effd46a00f66495ce700b (diff) | |
| download | django-rest-framework-5b7e4af0d657a575cb15eea85a63a7100c636085.tar.bz2 | |
get_base_field() refactor
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: |
