Skip to content

Instantly share code, notes, and snippets.

@sivy
Created October 16, 2012 14:32
Show Gist options
  • Save sivy/3899620 to your computer and use it in GitHub Desktop.
Save sivy/3899620 to your computer and use it in GitHub Desktop.
app = WSGIApplication([
DomainRoute('<subdomain>.' + config.APP_HOST, [
# request for sub.foo.com passes subdomain=sub to IndexHandler
Route('/', blog.IndexHandler, name='blog'),
# request for sub.foo.com/path passes path=foo to PostHandler
# but NOT the subdomain
# I expected this route to get subdomain=sub, path=path
Route('/<path:.+>', blog.PostHandler, name='post'),
]),
], config=config.webapp_cfg, debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment