          """
          Keys serialize to their string value,
          unless they exist in the `rename` dict.
          """
          return getattr(self.rename, key, key)
  
  
      def serialize_val(self, key, obj):
          """
          Convert a model field or dict value into a serializable representation.
 
</s> remove             if hasattr(self, fname):
 </s> add             if hasattr(self, smart_str(fname)): </s> remove from django.utils.encoding import smart_unicode, is_protected_type
 </s> add from django.utils.encoding import smart_unicode, is_protected_type, smart_str </s> remove             elif hasattr(instance, fname):
 </s> add             elif hasattr(instance, smart_str(fname)): </s> remove     source ./env/bin/activate
 </s> add     source env/bin/activate
        return getattr(self.rename, smart_str(key), smart_str(key))
          """
          Keys serialize to their string value,
          unless they exist in the `rename` dict.
          """
        return getattr(self.rename, smart_str(key), smart_str(key))
  
  
      def serialize_val(self, key, obj):
          """
          Convert a model field or dict value into a serializable representation.
keep keep keep keep replace keep keep keep keep keep
 Fix bitbucket issue 39.  All further issues should be on github 
djangorestframework/serializer.py