  class AlbumDetail(generics.RetrieveAPIView):
      model = Album
  
  
  class OptionalRelationDetail(generics.RetrieveUpdateDestroyAPIView):
      model = OptionalRelationModel
      model_serializer_class = serializers.HyperlinkedModelSerializer
  
 
</s> remove     read_only = True
 </s> add  </s> remove         kwargs = {self.pk_url_kwarg: obj.pk}
 </s> add         lookup_field = getattr(obj, self.lookup_field)
        kwargs = {self.lookup_field: lookup_field}
    serializer_class = AlbumSerializer
    lookup_field = 'title'
  class AlbumDetail(generics.RetrieveAPIView):
      model = Album
    serializer_class = AlbumSerializer
    lookup_field = 'title'
  
  
  class OptionalRelationDetail(generics.RetrieveUpdateDestroyAPIView):
      model = OptionalRelationModel
      model_serializer_class = serializers.HyperlinkedModelSerializer
  
keep add keep 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/tests/hyperlinkedserializers.py