When we run $ python manage.py runserver --settings=project.settings.local there are 4 different possible combinations:
$ python manage.py runserver --settings=project.settings.local
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.