Why would django fail with server 500 only when Debug=False AND db is set to production database on Heroku?

前端 未结 6 906
情歌与酒
情歌与酒 2020-12-11 18:28

When we run $ python manage.py runserver --settings=project.settings.local there are 4 different possible combinations:

  1. Debug=True && DB=l
6条回答
  •  天命终不由人
    2020-12-11 19:14

    I have had the same issue. But then I removed this row in settings.py

    STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
    

    Now I dont have 500 error when DEBUG=False. But probably, I guess gzip functionality doesnt work anymore.

提交回复
热议问题