super(ParameterisedHyperlinkedIdentityField, self).__init__(*args, **kwargs)

def get_url(self, obj, view_name, request, format):
    """
        Given an object, return the URL that hyperlinks to the object.
        May raise a `NoReverseMatch` if the `view_name` and `lookup_field`
        attributes are not configured to correctly match the URL conf.
        """
kwargs = {}
for model_field, url_param in self.lookup_fields:
    attr = obj
for field in model_field.split('.'):
    attr = getattr(attr, field)
kwargs[url_param] = attr
return reverse(view_name, kwargs=kwargs, request=request, format=format)
django-rest-framework HyperlinkedIdentityField with multiple lookup args