I'm trying to figure out how to change url routing based on namespace
Say I have myapp.x.com/apage and myapp.y.com/apage, I tried the code below but it doesn't work because I presume the main.py is being cached
ns = namespace_manager.google_apps_namespace()
if ns == 'x.com'
app = WSGIApplication([
(r'/apage', 'my.module.XHandler'),
])
else:
app = WSGIApplication([
(r'/apage', 'my.module.YHandler'),
])
Is there any other way to do it besides of course turning each handler into a url router?