I’m just now digging into GAE and I see two ways to make a particular URL pull up the right page.
The first way is using handlers:
handlers:
- url: /.*
script: helloworld.py
The other way is using the following:
application = webapp.WSGIApplication(
[('/', MainPage),
('/sign', Guestbook)],
debug=True)
Which is better or which is right? I don’t fully understand what the second example is doing exactly.
You need to use both. The section in app.yaml tells App Engine where to look for your WSGI application.
application = webapp.WSGIApplication(...)sets up your WSGI application using the webapp framework.update:
app.yaml:
cityhandler.py