          view_name = self.view_name
          request = self.context.get('request', None)
          kwargs = {self.pk_url_kwarg: obj.pk}
          try:
              return reverse(view_name, kwargs=kwargs, request=request)
          except:
              pass
  
          slug = getattr(obj, self.slug_field, None)
  
 
</s> remove         return reverse(view_name, kwargs=view_kwargs, request=request)
 </s> add         return reverse(view_name, kwargs=view_kwargs, request=request, format=format) </s> remove             return reverse(self.view_name, kwargs=kwargs, request=request)
 </s> add             return reverse(self.view_name, kwargs=kwargs, request=request, format=format) </s> remove             return reverse(self.view_name, kwargs=kwargs, request=request)
 </s> add             return reverse(self.view_name, kwargs=kwargs, request=request, format=format)
            return reverse(view_name, kwargs=kwargs, request=request, format=format)
          view_name = self.view_name
          request = self.context.get('request', None)
          kwargs = {self.pk_url_kwarg: obj.pk}
          try:
            return reverse(view_name, kwargs=kwargs, request=request, format=format)
          except:
              pass
  
          slug = getattr(obj, self.slug_field, None)
  
keep keep keep keep replace keep keep keep keep keep
 Fixes for urls with suffixes 
rest_framework/fields.py