Re: [google-appengine] Default namespace not working on production (multitenancy)

23 views
Skip to first unread message

Alex Martelli

unread,
Nov 4, 2015, 4:18:56 PM11/4/15
to google-a...@googlegroups.com
Call set_namespace(None), not set_namespace('').


Alex

On Tue, Nov 3, 2015 at 6:07 PM, Alejandro Casanovas <jandro.c...@gmail.com> wrote:

I have an application that is working nice in the development server but when I upload it to appspot it stops working.


The problem as I see is that it's not recognizing the default namespace.


For example, the login stops working because Users are stored in the default namespace but I can not get them because the 'get' to the datastore returns 0 entities...


So... trying to get any entity from the default namespace does not work:


namespace_manager.set_namespace('')
users = User.query().fetch()


This returns 0 entities (but I have some stored!!)


If I try to get entites from another namespace it works:


namespace_manager.set_namespace('5644406578591168')
entities = Foo.query().fetch()


This returns the correct number of entites from the datastore


I can see all the entities and query them from the developer console.


Any help please?



--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/7cf06276-7199-404c-a496-6c7e517ad085%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages