      def field_to_native(self, obj, field_name):
          request = self.context.get('request', None)
          format = self.context.get('format', None)
          view_name = self.view_name or self.parent.opts.view_name
          kwargs = {self.pk_url_kwarg: obj.pk}
  
          if request is None:
              warnings.warn("Using `HyperlinkedIdentityField` without including the "
                            "request in the serializer context is deprecated. "
                            "Add `context={'request': request}` when instantiating the serializer.",
 
</s> remove     read_only = True
 </s> add 
        lookup_field = getattr(obj, self.lookup_field)
        kwargs = {self.lookup_field: lookup_field}
      def field_to_native(self, obj, field_name):
          request = self.context.get('request', None)
          format = self.context.get('format', None)
          view_name = self.view_name or self.parent.opts.view_name
        lookup_field = getattr(obj, self.lookup_field)
        kwargs = {self.lookup_field: lookup_field}
  
          if request is None:
              warnings.warn("Using `HyperlinkedIdentityField` without including the "
                            "request in the serializer context is deprecated. "
                            "Add `context={'request': request}` when instantiating the serializer.",
keep keep keep keep replace keep keep keep keep keep
 HyperlinkedIdentityField uses `lookup_field` kwarg.

According to the [Serializers API Guide][1], `HyperlinkedIdentityField`
takes `lookup_field` as a kwarg like the other related fields and the
generic views. However, this was not actually implemented.

[1]: http://django-rest-framework.org/api-guide/serializers.html#hyperlinkedmodelserializer 
rest_framework/relations.py