How can I loaddata from a fixture remotely
Asked Answered
V

2

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?

Vanir answered 24/10, 2011 at 22:1 Comment(3)
Have you tried connecting a local deployment to a remote database?Milissamilissent
Ignacio, How do you do that? That sounds like what I want.Vanir
@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 itClintonclintonia
S
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.

Slaver answered 1/11, 2011 at 14:41 Comment(0)
P
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.

Pathogenesis answered 25/10, 2011 at 4:13 Comment(1)
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.Vanir

© 2022 - 2024 — McMap. All rights reserved.