mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +03:00
Drop unused import
This commit is contained in:
parent
a4e0f03050
commit
79b825ef32
|
@ -1,6 +1,5 @@
|
|||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import decimal
|
||||
import re
|
||||
|
||||
from django import template
|
||||
|
@ -133,6 +132,8 @@ def format_value(value):
|
|||
return mark_safe('<a href="{value}">{value}</a>'.format(value=escape(value)))
|
||||
elif '@' in value and not re.search(r'\s', value):
|
||||
return mark_safe('<a href="mailto:{value}">{value}</a>'.format(value=escape(value)))
|
||||
elif '\n' in value:
|
||||
return mark_safe('<pre>%s</pre>' % escape(value))
|
||||
return six.text_type(value)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user