Google App Engine に近づいています。ハンドラーをいくつか実装したいのですが、「おっと! このリンクは壊れているようです」というメッセージが表示されます。それぞれのエラー:
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()
単純な印刷機能 (つまり、print "2gf") を使用すると、すべてが完全に機能します。これは私の app.yaml ファイルです:
application: sample-app
version: 1
runtime: python
api_version: 1
handlers:
- url: /aaa/aaa
script: helloworld.py
- url: /bbb/bbb
script: helloworld2.py
提案?