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 c1a066d3..2bbdbe17 100644
--- a/rest_framework/views.py
+++ b/rest_framework/views.py
@@ -39,7 +39,8 @@ def _remove_leading_indent(content):
# unindent the content if needed
if whitespace_counts:
whitespace_pattern = '^' + (' ' * min(whitespace_counts))
- return re.sub(re.compile(whitespace_pattern, re.MULTILINE), '', content)
+ content = re.sub(re.compile(whitespace_pattern, re.MULTILINE), '', content)
+ content = content.strip('\n')
return content