-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure app service web application is throwing 500 internal server error when using whitenoise - CompressedManifestStaticFilesStorage and DEBUG = False #481
Comments
The error may be due to a reference to a static file that doesn't exist in the manifest. If you aren't seeing an error message in your logs, try configure it so that they do show up. Maybe try Sentry. |
I am having the same issue. I followed the troubleshooting and ran "manage.py findstatic --verbosity 2 styles.css" which is the only css file currently referenced in my code. It showed the static file as existing in the correct folder (that was specified by the static_root setting). The error persists. It goes away if I comment out STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'. I just want to reiterate that this is not due to a reference to a static file that doesn't exist in the manifest. As far as I can tell, the manifest is never created. Logging set up in the settings.py file shows the ValueError that is mentioned in the documentation |
I am having the same issue, I am still trying to debug it. When I have the following
All of the template stuff using 'static' generates incorrect URL. With the above example my favicon static url is |
I figured it out, if you have a leading Works
Does not working with the whtienoise static backend, but it does with the built in Django static backend
|
I think this is behaviour from Django's |
Python Version
3.9
Django Version
3.2
Package Version
1.0
Description
In my Django project settings.py file, i am using DEBUG = False and whitenoise to serve my static content on azure app services web application.
When I use the following line which uses CompressedManifestStaticFilesStorage, I am getting 500 internal server error.
STATICFILES_STORAGE = ('whitenoise.storage.CompressedManifestStaticFilesStorage')
I was able to solve this problem by changing the above line to below,
STATICFILES_STORAGE = ('whitenoise.storage.CompressedStaticFilesStorage')
(or)
I want to understand the rootcause of why it failed with DEBUG = False. We are not getting any error logs as well
With DEBUG = True, I don't see any error, it works fine but as you know it's not recommended to use Debug = True in production systems.
The text was updated successfully, but these errors were encountered: