      """
      pk_url_kwarg = 'pk'
      slug_field = 'slug'
      slug_url_kwarg = None  # Defaults to same as `slug_field` unless overridden
      read_only = True
  
      def __init__(self, *args, **kwargs):
          # TODO: Make view_name mandatory, and have the
          # HyperlinkedModelSerializer set it on-the-fly
          self.view_name = kwargs.pop('view_name', None)
 
</s> remove         kwargs = {self.pk_url_kwarg: obj.pk}
 </s> add         lookup_field = getattr(obj, self.lookup_field)
        kwargs = {self.lookup_field: lookup_field}
      """
      pk_url_kwarg = 'pk'
      slug_field = 'slug'
      slug_url_kwarg = None  # Defaults to same as `slug_field` unless overridden

  
      def __init__(self, *args, **kwargs):
          # TODO: Make view_name mandatory, and have the
          # HyperlinkedModelSerializer set it on-the-fly
          self.view_name = kwargs.pop('view_name', None)
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