How can I loaddata from a fixture remotely

橙三吉。 提交于 2020-01-03 19:30:34

问题


With Django-nonrel on GAE, how do I do I load in a fixture to the server after deploying? I'm able to do it locallay via

python manage.py loaddata fixturename

But how can I do it on a deployed app that is already on appspot.com?


回答1:


I believe the answer is

python manage.py remote loaddata fixturename

with an additional 'remote' word. I've tested that (about five minute before I type this). It will prompt for your gmail account and password.

You also need to enable remote_api in app.yaml (if i'm not mistaken)

builtins:
- remote_api: on

I hope that work.




回答2:


You should look into using the appengine bulkloader. http://code.google.com/appengine/docs/python/tools/uploadingdata.html

I've only used it with stock appengine and it works like a charm; for django-nonrel you may have to handle a few things yourself but it should still be fine.



来源:https://stackoverflow.com/questions/7882531/how-can-i-loaddata-from-a-fixture-remotely

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!