2π
I found this information on http://www.gettingstartedwithdjango.com/introduction-and-launch.html#what-heroku-does-every-time-you-push-to-them-is
What Heroku does every time you push to them is:
- Creates a new app space with its own virtual machine, virtual environment, and packages installed through pip.
- Swaps the subdomain over to the new location.
- Deletes the old app space.
What this means is that anything added to the app that is not in Git, wonβt last between pushes. Even more, this exact same process happens once every 24 hours anyway, so uploaded files have to go somewhere other than Heroku.
You might look into this as a possible source of your issue.
1π
Here is an answer from the pythonanywhere blog which may answer your question.
Basically, when going into production, setting (in settings.py) DEBUG = False
raises a security lock on the file tampering with the image urls.
So basically a file path change is in order for the MEDIA_ROOT
from development to production.
More information given on the blog here.
Hope this helps!