[Answered ]-Why doesn't my css effect my django html template?

1👍

loading css is a headache in django …it saves to cache you need to empty cache and collectstatic

what i am using is

1- make a css.html with <style> your_css </style> tag and put the css in it

2- in the page i need the css i use the {%include "css.html"%} to load the css

you edit directly… no cache no collectstatic..nothing

0👍

My code worked when thanks to commentors I deleted the type from my stylesheet tag.

 <link rel='stylesheet' href="{% static 'style.css' %}?{% now 'U' %}"/>

It works now

Leave a comment