diff options
| author | Tom Christie | 2012-09-28 16:41:35 +0100 | 
|---|---|---|
| committer | Tom Christie | 2012-09-28 16:41:35 +0100 | 
| commit | 224bc027cd611cf6ec7dcb7958a675bea39eeb97 (patch) | |
| tree | e180d7ad0bfd37cf3eb0e8a611ceda1cd1f1ab4a /rest_framework/views.py | |
| parent | 0853316545ad39c314f56ee559ce56596e578d2b (diff) | |
| download | django-rest-framework-224bc027cd611cf6ec7dcb7958a675bea39eeb97.tar.bz2 | |
Add more tests for generic views
Diffstat (limited to 'rest_framework/views.py')
| -rw-r--r-- | rest_framework/views.py | 3 | 
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 | 
