【发布时间】:2017-04-13 11:30:54
【问题描述】:
import webapp2
form="""
<form method="post">
<input type="" name="day">
<input type="" name="month">
<input type="" name="year">
<input type="submit" name="">
</form>
"""
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.out.write(form)
def post(self):
self.response.out.write("thank")
app = webapp2.WSGIApplication([('/', MainPage),], debug=True)
此代码响应
405 方法不允许
此资源不允许使用 POST 方法。
【问题讨论】:
-
欢迎来到 Stack Overflow。请edit您的问题并修复已发布代码的缩进,以便我们可以查看
class的一部分和不是。