The method is not allowed for the requested URL

错误 The method is not allowed for the requested URL

flask中表单提交数据时有两种方式,get 和post,默认是get,而当路由当中没有写method="POST",导致只能默认接受GET请求,就会出现这个错误

错误写法:

The method is not allowed for the requested URL_第1张图片

正确写法:

The method is not allowed for the requested URL_第2张图片

 

你可能感兴趣的:(架构,flask,method)