Re: Get namespace

14 views
Skip to first unread message

timh

unread,
Jul 9, 2012, 7:25:17 AM7/9/12
to google-a...@googlegroups.com
Think about it,

If you do 

bla = namespace_manager.get_namespace()
namespace_manager.set_namespace(bla)

Then you have just fetched the current namespace, and then set it to that value.
Setting the namespace needs to be done with every request.

Have a look at the first few paragraphs of Setting the  Current Namespace in
 https://developers.google.com/appengine/docs/python/multitenancy/multitenancy



T

On Thursday, July 5, 2012 10:19:03 PM UTC+8, vivendi wrote:
I'm currently implementing the App Engine in a Python web app. But i'm really stuck with a few things that, in my opinion, the documentation doesn't really cover. Not in great detail anyway.

First thing that i'm trying to do is get the current namespace, and then set that namespace. This works good for me:

namespace_manager.set_namespace('test')

But for some reason the following doesn't work when i visit this URL:
(fictive url)
http://test.my-app.appspot.com

bla = namespace_manager.get_namespace()
namespace_manager
.set_namespace(bla)

This doesn't give me the namespace data, but just the data that was saved under no namespace.

Anyone any idea what the problem could be?

Reply all
Reply to author
Forward
0 new messages