def handle_405(environ, start_response):
 _methods = util.wsgi_path_item(environ, '_methods')
 headers = {}
 if _methods:
  headers['allow'] = str(_methods)
 raise webob.exc.HTTPMethodNotAllowed(_('The method specified is not allowed for this resource.'), headers=headers, json_formatter=util.json_error_formatter)

def handle_405 ( environ , start_response ) : _methods = util . wsgi_path_item ( environ , '_methods' ) headers = { } if _methods : headers [ 'allow' ] = str ( _methods ) raise webob . exc . HTTPMethodNotAllowed ( _ ( 'The method specified is not allowed for this resource.' ) , headers = headers , json_formatter = util . json_error_formatter )
return a 405 response when method is not allowed .