setting url in yaml file for google app engin (page not found) problem

Posted by mswallace on Stack Overflow See other posts from Stack Overflow or by mswallace
Published on 2010-05-15T14:38:33Z Indexed on 2010/05/15 14:44 UTC
Read the original article Hit count: 299

I am new to python and I am super excited to learn. I am building my first app on app engin and I am not totally understanding why my yaml file is not resolving to the url that I set up.

here is the code

handlers:
- url: .*
  script: main.py

- url: /letmein/.*
  script: letmein.py 

so if I go to http://localhost:8080/letmein/ I get a link is brooken or page not found error.

here is the python code that I have in letmein.py

from google.appengine.ext import webapp
from google.appengine.ext.webapp import util


class LetMeInHandler(webapp.RequestHandler):
    def get(self):
        self.response.out.write('letmein!')


def main():
    application = webapp.WSGIApplication([('/letmein/', LetMeInHandler)],
                                         debug=True)
    util.run_wsgi_app(application)


if __name__ == '__main__':
    main()

thanks in advance for the help!

© Stack Overflow or respective owner

Related posts about python

Related posts about yaml