我刚开始学习谷歌应用引擎.
当我在下面输入以下代码时,我得到的只是"Hello world!" 我认为期望的结果是"你好,webapp世界!"
我错过了什么?我甚至尝试将google framework文件夹复制到与我的应用程序相同的文件夹中.
谢谢.
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
class MainPage(webapp.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write('Hello, webapp World!')
application = webapp.WSGIApplication(
[('/', MainPage)],
debug=True)
def main():
run_wsgi_app(application)
if __name__ == "__main__":
main()
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
275 次 |
| 最近记录: |