3 ms·
One code base. You set a namespace and all datastore, memcache, and task queues operations are performed in that space. So: from google.appengine.api.namesp
by detst 16y ago
One code base. You set a namespace and all datastore, memcache, and task queues operations are performed in that space.
So:
from google.appengine.api.namespace_manager import set_namespace
set_namespace('user1')
Now everything is done in the 'user1' namespace.
EDIT:
http://code.google.com/appengine/docs/python/multitenancy/multitenancy.html http://code.google.com/appengine/docs/python/multitenancy/mu... gives more details using a "namespace manager" but I think my example above answers your question so I'll leave it as-is.