aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'rest_framework/views.py')
-rw-r--r--rest_framework/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rest_framework/views.py b/rest_framework/views.py
index 790c76fa..2c940dac 100644
--- a/rest_framework/views.py
+++ b/rest_framework/views.py
@@ -50,7 +50,8 @@ def _camelcase_to_spaces(content):
Used when generating names from view classes.
"""
camelcase_boundry = '(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))'
- return re.sub(camelcase_boundry, ' \\1', content).strip()
+ content = re.sub(camelcase_boundry, ' \\1', content).strip()
+ return ' '.join(content.split('_')).title()
class APIView(View):