In my settings i have set DEBUG=False
but this instead generated a 500 Error in both dev and production. so i looked around and came across this (Setting DEBUG = False causes 500 Error) and tried it out.
ALLOWED_HOSTS = ['www.heroku.com']
But this did not work, what am i not doing right? Am hosting with heroku
The DEBUG=True , if there is error, page will show details of error. if DEBUG=False , the ALLOWED_HOSTS of settings.py will work, you should take carefully to set it. the media and static will not provide access for DEBUG=False , you have to provide them with the help of webserver, like Nginx or Apache .
Most importantly, you should never run Arches in production with DEBUG = True . Open your settings.py file (or settings_local.py ) and set DEBUG = False (just add that line if necessary).
Collectstatic during buildsWhen a Django application is deployed to Heroku, $ python manage.py collectstatic --noinput is run automatically during the build.
Your app is not hosted on www.heroku.com. Instead, try
ALLOWED_HOSTS = [".herokuapp.com"]
did you try
python manage.py collecstatic
?
you should review files directory becuase in prodhuction static files directory changes. heroku uses whitenouse
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With