Open NamanJn opened 5 years ago
If you want to handle the configuration of static files yourself I think you should pass staticfiles=False
when calling django_heroku.settings
in your settings.py
:
django_heroku.settings(locals(), staticfiles=False)
Make sure you are then defining all the other options as well (STATIC_ROOT
, STATICFILES_STORAGE
etc).
Spent two very frustrating days because Heroku documentation does not highlight this. Documentation says that django_heroku.settings(locals()) should be at the end of the settings.py file. How's one to know that that's where STATIC_URL suddenly takes a new value and storage becomes 'whitenoise..... Anyway, thanks tyrion, your suggestion works.
Not sure if I'm missing anything but when I set my STATIC_URL to my s3 bucket, STATIC_URL changes back to '/static/'.
Line 96 of core.py in django_heroku is where the STATIC_URL is reset.
Is this a bug or am I just missing something?