python - App Engine regex issues directing URL to script and handlers -
i trying break app separate scripts. part of effort meant breaking api calls it's own file. calls api (like http://example.com/api/game/new no longer work). app.yaml contains this:
- url: /api.* script: api.py
which seems redirecting because configuration works:
def main(): application = webapp.wsgiapplication([('/.*', testpage)], debug=true) util.run_wsgi_app(application)
however 1 doesn't:
def main(): application = webapp.wsgiapplication([('/game/new$', creategame), ('/game/(d+)$', gamehandler)], debug=true) util.run_wsgi_app(application)
the url patterns use in wsgi application have full path - eg, /api/game/.... app engine infrastructure uses regular expressions in app.yaml route requests, not modify request path based on them.
Comments
Post a Comment