title: in appengine how can i have namespace based url routing?
body: <p>I'm trying to figure out how to change url routing based on namespace</p>
  
  <p>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</p>
  
  <pre><code>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'),
      ])
  </code></pre>
  
  <p>Is there any other way to do it besides of course turning each handler into a url router?</p>