  from django.utils.encoding import smart_text
  from django.utils.six.moves.urllib import parse as urlparse
  from django.utils.translation import ugettext_lazy as _
  
  
  class PKOnlyObject(object):
      """
      This is a mock object, used for when we only need the pk of the object
      instance, but still want to return an object with a .pk attribute,
 
</s> remove from django.utils.encoding import smart_text
from rest_framework.fields import get_attribute, empty, Field
from rest_framework.reverse import reverse
from rest_framework.utils import html
 </s> add # coding: utf-8
from __future__ import unicode_literals </s> remove         return str(self.detail)
 </s> add         return six.text_type(self.detail) </s> remove                 str(self.to_representation(item)),
                str(item)
 </s> add                 six.text_type(self.to_representation(item)),
                six.text_type(item)
from rest_framework.fields import get_attribute, empty, Field
from rest_framework.reverse import reverse
from rest_framework.utils import html
  from django.utils.encoding import smart_text
  from django.utils.six.moves.urllib import parse as urlparse
  from django.utils.translation import ugettext_lazy as _
from rest_framework.fields import get_attribute, empty, Field
from rest_framework.reverse import reverse
from rest_framework.utils import html
  
  
  class PKOnlyObject(object):
      """
      This is a mock object, used for when we only need the pk of the object
      instance, but still want to return an object with a .pk attribute,
keep keep add keep keep keep keep keep keep
 str() -> six.text_type(). Closes #2290. 
rest_framework/relations.py