  
          if not slug:
              raise Exception('Could not resolve URL for field using view name "%s"' % view_name)
  
          kwargs = {self.slug_url_kwarg: slug}
          try:
              return reverse(view_name, kwargs=kwargs, request=request, format=format)
          except NoReverseMatch:
              pass
  
          kwargs = {self.pk_url_kwarg: obj.pk, self.slug_url_kwarg: slug}
          try:
              return reverse(view_name, kwargs=kwargs, request=request, format=format)
          except NoReverseMatch:
 
</s> remove         if not slug:
            raise Exception('Could not resolve URL for field using view name "%s"' % view_name)
 </s> add         raise NoReverseMatch() </s> remove             return reverse(view_name, kwargs=kwargs, request=request, format=format)
 </s> add             return self.get_url(obj, view_name, request, format) </s> remove             pass

        raise Exception('Could not resolve URL for field using view name "%s"' % view_name)
 </s> add             msg = (
                'Could not resolve URL for hyperlinked relationship using '
                'view name "%s". You may have failed to include the related '
                'model in your API, or incorrectly configured the '
                '`lookup_field` attribute on this field.'
            )
            raise Exception(msg % view_name)
    def get_object(self, queryset, view_name, view_args, view_kwargs):
        """
        Return the object corresponding to a matched URL.
  
          if not slug:
              raise Exception('Could not resolve URL for field using view name "%s"' % view_name)
  
    def get_object(self, queryset, view_name, view_args, view_kwargs):
        """
        Return the object corresponding to a matched URL.
    def get_object(self, queryset, view_name, view_args, view_kwargs):
        """
        Return the object corresponding to a matched URL.
    def get_object(self, queryset, view_name, view_args, view_kwargs):
        """
        Return the object corresponding to a matched URL.
    def get_object(self, queryset, view_name, view_args, view_kwargs):
        """
        Return the object corresponding to a matched URL.
    def get_object(self, queryset, view_name, view_args, view_kwargs):
        """
        Return the object corresponding to a matched URL.
  
          kwargs = {self.pk_url_kwarg: obj.pk, self.slug_url_kwarg: slug}
          try:
              return reverse(view_name, kwargs=kwargs, request=request, format=format)
          except NoReverseMatch:
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 lookup_field on hyperlinked fields, and overriddable hyperlinked fields.  Closes #688 
rest_framework/relations.py