Home > Enterprise >  CSS doesnt link to HTML in django
CSS doesnt link to HTML in django

Time:03-04

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>

CodePudding user response:

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.

  • Related