I’m currently using the Google App Engine with Python. I setup some data in a namespace, and now i’m trying to get that data from a namespace. But i can’t get it to work.
When i do this, then it all works fine:
namespace_manager.set_namespace('test')
But when i do this, then it doesn’t work:
bla = namespace_manager.get_namespace()
namespace_manager.set_namespace(bla)
My URL did point to a namespace: http://test.my-app.appspot.com
But for some reason it doesn’t pick up the namespace. Anyone any idea what could be wrong?
That’s a sub-domain, not a namespace. If you want each subdomain to correspond to a namespace, you will need to configure that yourself, by setting the namespace for each request based on the domain name.
Your second snippet will never do anything – it will always set the namespace to what it already is.