Explicitly concatenate `settings.STATIC_URL` with the URL could cause problems when serving static files.
Closed this issue · 0 comments
aleg commented
- django-json-widget version: 0.1.1
- Django version: 2.0.6
- Python version: 3.5.2
- Operating System: macOS High Sierra
Description
I have a custom version of ManifestStaticFilesStorage
that removes the non-hashed files when calling collectstatic
.
The widget concatenates settings.STATIC_URL
to the URL pointing to the static files. This means that the hash created by the files storage will be ignored and a 404 will be returned as a result.
This is a specific case, but I think in general it's not a good practice to hardcode/concatenate URLs like that.
What I Did
Happy to create a PR to fix this, it's a very small change.