  
          if model_field:
              kwargs['required'] = not(model_field.null or model_field.blank)
  
          return HyperlinkedRelatedField(**kwargs)
  
      def get_identity(self, data):
          """
          This hook is required for bulk update.
          We need to override the default, to use the url as the identity.
 
</s> remove         Get the name of a slug field to be used to look up by slug.
        """
        return self.slug_field

    def to_native(self, obj):
        view_name = self.view_name
        request = self.context.get('request', None)
        format = self.format or self.context.get('format', None)

        if request is None:
            warnings.warn("Using `HyperlinkedRelatedField` without including the "
                          "request in the serializer context is deprecated. "
                          "Add `context={'request': request}` when instantiating the serializer.",
                          DeprecationWarning, stacklevel=4)
 </s> add         Given an object, return the URL that hyperlinks to the object. </s> remove     pk_url_kwarg = 'pk'
    slug_field = 'slug'
    slug_url_kwarg = None  # Defaults to same as `slug_field` unless overridden
 </s> add  </s> remove         kwargs = {self.slug_url_kwarg: slug}
        try:
            return reverse(view_name, kwargs=kwargs, request=request, format=format)
        except NoReverseMatch:
            pass
 </s> add     def get_object(self, queryset, view_name, view_args, view_kwargs):
        """
        Return the object corresponding to a matched URL.
        return self._hyperlink_field_class(**kwargs)
  
          if model_field:
              kwargs['required'] = not(model_field.null or model_field.blank)
  
        return self._hyperlink_field_class(**kwargs)
  
      def get_identity(self, data):
          """
          This hook is required for bulk update.
          We need to override the default, to use the url as the identity.
keep keep keep keep replace keep keep keep keep keep
 lookup_field on hyperlinked fields, and overriddable hyperlinked fields.  Closes #688 
rest_framework/serializers.py