Does the Google App Engine and Django Sandbox: Shell and Web seem to use different datastores?

I am new to Django and the Google App Engine, and use the sandbox in OSX10.6 with GoogleAppEngineLauncher. I have a basic “bookstore” application launched from a tutorial in OReilly's book “Google App Engine Programming”.

Here's the error: if I add a new object to the data store via the web interface, then it is read through the web interface, but it does not seem to exist if I request the data store through the shell. And vice versa: if I add an object to the shell, I can read it from the shell, but it does not appear in the web interface.

Bound curio: all data disappears from both data stores when my computer reboots.

Any thoughts or theories would be welcome. Thank!

= T =

+3
source share
2 answers

If you use the remote API shell and point it to the instance that you are using on your computer, you should get the same data store file. It is unclear how you access your application through the "shell", but it seems that you are creating a second instance for this.

Data disappears from the data store when you restart your computer, because by default the data store file is created in / tmp; you can specify a different location (which the system does not clear for you upon reboot) for it when you run dev_appserver.py.

0
source

, python manage.py ( ), Launcher. , . App Engine? dev python manage.py runserver, Launcher manage.py shell.

. App Engine, - , - "" ( ctrl-c, dev_appserver.py, , Linux), . , .

0

Source: https://habr.com/ru/post/1741337/


All Articles