问题
So I'm using sass to update my Django site and I am using git to version the whole thing. I recently made an update to CSS file that had some bad errors in it. Sass compiled the changes and I pushed the new version to the server. I have looked on the server and the new css file is in fact there and reflects the changes, however when I look at our site the css file is being referenced as a cached file:
"/static/CACHE/css/35ed7f45f0e3.css"
Unfortunatley this cached version still has the errors in it, how can I tell django and memcache to refresh this reference so my site doesn't look like poop?
I have tried clearing the cache via the shell but the old cached file reference persists in my html.
回答1:
Did you run collectstatic ?
python manage.py collectstatic
回答2:
2020
If python manage.py collectstatic
solution doesn't work and everything is correct in your code.
Press ctr + F5
in your browser to bypass the cache.
Then it will work hopefully.
来源:https://stackoverflow.com/questions/20576318/django-not-showing-updated-css-files