  from django import template
  from django.core.urlresolvers import reverse, NoReverseMatch
  from django.http import QueryDict
  from django.utils import six
  from django.utils.encoding import iri_to_uri
  from django.utils.html import escape
  from django.utils.safestring import SafeData, mark_safe
  from django.utils.html import smart_urlquote
  from rest_framework.compat import urlparse, force_text
  from rest_framework.renderers import HTMLFormRenderer
 
</s> remove from rest_framework.compat import urlparse, force_text
 </s> add from rest_framework.compat import urlparse </s> remove from rest_framework.compat import etree, yaml, force_text, urlparse
 </s> add from django.utils.encoding import force_text
from rest_framework.compat import etree, yaml, urlparse </s> remove from rest_framework.compat import smart_text, urlparse
 </s> add from django.utils.encoding import smart_text
from rest_framework.compat import urlparse
from django.utils.encoding import iri_to_uri, force_text
  from django import template
  from django.core.urlresolvers import reverse, NoReverseMatch
  from django.http import QueryDict
  from django.utils import six
from django.utils.encoding import iri_to_uri, force_text
  from django.utils.html import escape
  from django.utils.safestring import SafeData, mark_safe
  from django.utils.html import smart_urlquote
  from rest_framework.compat import urlparse, force_text
  from rest_framework.renderers import HTMLFormRenderer
keep keep keep keep replace keep keep keep keep keep
 Removed custom StringIO, force_text, smart_text compat 
rest_framework/templatetags/rest_framework.py