0

I am watching beginner course on django . So basically i am running server from cmd and when i want to change anything on css file it doesnt change live . My css file is in static folder in root directory.

STATIC_URL = '/static/'
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'),)

my html :

{% load static %}
<link type = "text/css" href="{% static 'style.css' %}" rel="stylesheet">
<h1>Hi welcome to my page </h1>
3
  • In what subdirectory of your app is the css file located?
    – 9769953
    Commented Mar 4, 2022 at 12:35
  • Hard refresh your webpage using Ctrl + F5 you will see the changes. Commented Mar 4, 2022 at 12:37
  • update full traceback of your static folder. Commented Mar 4, 2022 at 13:11

2 Answers 2

1

You have to reload the page and the server once you have made the changes. Stop the server after the changes and start it again and reload the page.

0

A quick way exist, the shortcut to reload cache:

Ctrl + Shift + R

Then just reload page

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.