-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make a way to load fixtures into the site #11
Comments
the current solution: include in git (under static/src), then use heroku Procfile to make links in ilpycon/site_media. |
Can't one simply do: heroku run python manage.py loaddata the_fixture |
Yes, I don't think there's anything left to do here. If anyone disagrees, please reopen. |
FTR the method suggested by Meir does not work. Or rather, it only works if you have the fixture on the dyno. The whole point is that we do not want it in the git repo (e.g. might contain sensitive user data), and it is surpisingly difficult to get data files into the dyno in other ways (most reliable way I found was using netcat with two terminals). |
However, there is another way which does work: use local manage.py with heroku's postgresql db:
|
Really? The PG instance is accessible from outside? That's worrying... The way to make sure you don't "forget to unset the env var" is not to
|
Basically a view that does
loaddata
-- which will allow us to prepare data files and load them in without including them in the site sources.It would be nice if this view can also handle media files.
At some point we want a solution which allows downloading "full data" (including both data and dynamic media) as a backup; if the "upload" solution can just take whatever the "backup" produces, it could be really nice.
The text was updated successfully, but these errors were encountered: