Call set_namespace(None), *not* set_namespace('').
Alex
On Tue, Nov 3, 2015 at 6:07 PM, Alejandro Casanovas <
[email protected]> 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 [email protected].
> To post to this group, send email to [email protected].
> 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
> <https://groups.google.com/d/msgid/google-appengine/7cf06276-7199-404c-a496-6c7e517ad085%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
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 [email protected].
To post to this group, send email to [email protected].
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/CAE46Be_g3cwwVw5kiEoxhGKCkjj302qOJp-5bPtLqZ1CbhM%2BeQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.