CSS changes not taking effect in Django development
P粉546257913
2023-08-20 22:24:24
<p>I'm trying to create a web application using Django and I've encountered a problem. Whenever I make any changes to the css file, the web page does not show those changes. However, if I copy the contents of that css file, create a new css file and paste it in there, it works perfectly. I don't know what's going on, please help. </p>
<p>I tried to change the css to make some changes in the web page, but the changes were not applied. If I want to make any changes I have to create a new file and copy the content from the previous css file. This new file worked fine for a while, then stopped responding again - then I had to create a new css file. </p>
View this article https://docs.djangoproject.com/en/4.2/howto/static-files/
If you have done all the steps correctly, then after each change you need to use the command
python manage.py collectstatic