我正在执行以下代码。
import webapp2
form="""
<form method = "post">
What is your birthday?
<p>
<label>
Day
<input type = "text" name = "day">
Month
<input type = "text" name = "month">
Year
<input type = "text" name = "year">
</p>
<input type = "submit">
</form>
"""
class MainHandler(webapp2.RequestHandler):
def get(self):
self.response.out.write(form)
def post(self):
self.response.out.write(form)
app = webapp2.WSGIApplication([
('/', MainHandler)
], debug=True)
当我尝试打开页面localhost:8080时,我什么也没看到。页面是空的。