4

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.

2 Answers 2

10

Did you run collectstatic ?

python manage.py collectstatic 
Sign up to request clarification or add additional context in comments.

2 Comments

Yep, this was it, as soon as I read your comment I groaned out loud. The dev that trained my actually made a point of explaining this to me as if he knew I would screw this up someday. Thank you much Adrien!
I get the next django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path. It means that collecstatic is a plugin and I am not using it?
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.