Skip to content

Instantly share code, notes, and snippets.

@vitorbal
Created February 27, 2011 08:16
Show Gist options
  • Save vitorbal/846012 to your computer and use it in GitHub Desktop.
Save vitorbal/846012 to your computer and use it in GitHub Desktop.
How to use parts of the url path as variables for a handler in Google App Engine
class RenderMovieShowTimes(webapp.RequestHandler):
def get(self, cityid, movieid):
# cityid and movieid will contain the passed variables
# do something with them
application = webapp.WSGIApplication([ '/([^/]+)/([^/]+)' ])
def main():
run_wsgi_app(application)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment