Reputation: 2429
I've got a few rather large fixtures of static data (about 20MB each) that I'd like to keep out of my repo to keep the repo size under control. Is there any way to load fixtures from a URL? I took a long shot and pushed my fixture up to S3 in hopes that the following would work, but no luck.
python manage.py loaddata http://s3.amazonaws.com/path/to/fixtures/initial_stuff.json
Does anyone have any ideas for install fixtures via HTTP?
Upvotes: 4
Views: 709
Reputation: 106
I've only used it for downloading fixtures, but django-smuggler may do what you want: https://github.com/semente/django-smuggler.
From the Readme:
Django Smuggler is a pluggable application for Django Web Framework for you easily dump/load fixtures via the automatically-generated administration interface. Especially useful for transporting data in production for the development project and vice versa, but can also be used as a backup tool.
Upvotes: 0
Reputation: 1595
Have you tried using curl and xargs?
curl http://s3.amazonaws.com/path/to/fixtures/initial_stuff.json | xargs python manage.py loaddata
If that doesn't work, I suppose you'll have to dump it to a file and then loaddata.
curl http://s3.amazonaws.com/path/to/fixtures/initial_stuff.json > tmp.json
python manage.py loaddata tmp.json
Upvotes: 6