      def __init__(self, detail=None):
          self.detail = detail or self.default_detail
  
  
  class InvalidFormat(APIException):
      status_code = status.HTTP_404_NOT_FOUND
      default_detail = "Format suffix '.%s' not found."
  
      def __init__(self, format, detail=None):
          self.detail = (detail or self.default_detail) % format
  
  
  class MethodNotAllowed(APIException):
      status_code = status.HTTP_405_METHOD_NOT_ALLOWED
      default_detail = "Method '%s' not allowed."
  
      def __init__(self, method, detail=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)
      def __init__(self, detail=None):
          self.detail = detail or self.default_detail
  
  








  class MethodNotAllowed(APIException):
      status_code = status.HTTP_405_METHOD_NOT_ALLOWED
      default_detail = "Method '%s' not allowed."
  
      def __init__(self, method, detail=None):
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep keep keep
 Fixes for urls with suffixes 
rest_framework/exceptions.py