      def check_method_allowed(self, method, auth):
          """Ensure the request method is permitted for this resource, raising a ResourceException if it is not."""
  
          if not method in self.callmap.keys():
              raise ResponseException(status.HTTP_501_NOT_IMPLEMENTED,
                                      {'detail': 'Unknown or unsupported method \'%s\'' % method})
  
          if not method in self.allowed_methods:
              raise ResponseException(status.HTTP_405_METHOD_NOT_ALLOWED,
                                      {'detail': 'Method \'%s\' not allowed on this resource.' % method})
 
</s> remove             raise ResponseException(status.HTTP_405_METHOD_NOT_ALLOWED,
 </s> add             raise ErrorResponse(status.HTTP_405_METHOD_NOT_ALLOWED, </s> remove         raise ResponseException(status.HTTP_500_INTERNAL_SERVER_ERROR,
 </s> add         raise ErrorResponse(status.HTTP_500_INTERNAL_SERVER_ERROR, </s> remove             raise ResponseException(status.HTTP_403_FORBIDDEN,
 </s> add             raise ErrorResponse(status.HTTP_403_FORBIDDEN, </s> remove         if output is NoContent:
 </s> add         if output is None: </s> remove     def emit(self, output=NoContent, verbose=False):
 </s> add     def emit(self, output=None, verbose=False):
            raise ErrorResponse(status.HTTP_501_NOT_IMPLEMENTED,
      def check_method_allowed(self, method, auth):
          """Ensure the request method is permitted for this resource, raising a ResourceException if it is not."""
  
          if not method in self.callmap.keys():
            raise ErrorResponse(status.HTTP_501_NOT_IMPLEMENTED,
                                      {'detail': 'Unknown or unsupported method \'%s\'' % method})
  
          if not method in self.allowed_methods:
              raise ResponseException(status.HTTP_405_METHOD_NOT_ALLOWED,
                                      {'detail': 'Method \'%s\' not allowed on this resource.' % method})
keep keep keep keep replace keep keep keep keep keep
 Rename mixins into Mixin class, rename ResponseException to ErrorResponse, remove NoContent 
djangorestframework/resource.py