4

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?

b-ryce
  • 5,752
  • 7
  • 49
  • 79
  • Have you tried connecting a local deployment to a remote database? – Ignacio Vazquez-Abrams Oct 24 '11 at 22:20
  • Ignacio, How do you do that? That sounds like what I want. – b-ryce Oct 26 '11 at 18:03
  • @IgnacioVazquez-Abrams: thanks, that works fine with GAE SQL Second Generation. But for First Generation there are no ipv4 addresses included (for Second Generation you get an ipv4 address for free): you have to pay for one ipv4 address, and I have unfortunately no ipv6. Is there any way to connect remotely to a First Generation SQL instance, with ipv4, without having to pay for an ipv4 address for the SQL instance? I would just use Second Generation, but I [can not get django to connect to it](http://stackoverflow.com/q/34933941/647991) – blueFast Jan 21 '16 at 21:21

2 Answers2

2

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.

asdacap
  • 738
  • 2
  • 9
  • 15
0

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.

waffle paradox
  • 2,755
  • 18
  • 19
  • I'm taking a look and see if it works with nonrel. Thanks for input. After looking into it, I'll accept the answer or provide more feedback. – b-ryce Oct 26 '11 at 16:13