【发布时间】:2013-10-17 03:48:21
【问题描述】:
我正在执行以下代码。
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 时,我什么也没看到。页面为空。
【问题讨论】:
-
什么是网页服务? This page 建议 Google App 引擎或本地设置应该这样做。您是否设置了其中任何一个?