aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/utils/formatting.py
diff options
context:
space:
mode:
Diffstat (limited to 'rest_framework/utils/formatting.py')
-rw-r--r--rest_framework/utils/formatting.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/rest_framework/utils/formatting.py b/rest_framework/utils/formatting.py
index 4b59ba84..12b79b6c 100644
--- a/rest_framework/utils/formatting.py
+++ b/rest_framework/utils/formatting.py
@@ -6,8 +6,6 @@ from __future__ import unicode_literals
from django.utils.html import escape
from django.utils.safestring import mark_safe
from rest_framework.compat import apply_markdown
-from rest_framework.settings import api_settings
-from textwrap import dedent
import re
@@ -36,7 +34,7 @@ def dedent(content):
# unindent the content if needed
if whitespace_counts:
whitespace_pattern = '^' + (' ' * min(whitespace_counts))
- content = re.sub(re.compile(whitespace_pattern, re.MULTILINE), '', content)
+ content = re.sub(re.compile(whitespace_pattern, re.MULTILINE), '', unicode(content))
return content.strip()