添加扩展和加载静态标签后 Django 中断

Django breaking after adding extend and load static tags

所以我在django中使用了模板继承。我使用后

{% extends 'basic.html' %}
{% load static %}

html 和 css 不更新。我的意思是,如果例如当我更改页面标题然后保存并刷新 [通过 ctrl f5 和 ctrl r] 它不会做任何事情。扩展工作正常,但是当我首先使用 load static 时,当我更新或添加任何 html 时它不会加载它,就像“我不在乎”并且不更新任何东西。 代码

{% extends 'basic.html' %}
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Do</title>
</head>
<body>
    <p> Help </p>    
</body>
</html>

basic.html

<div class="upper">
<p class="blogtitle"> Utsab's Blogs </p>
<a href="/" class="homebutton"> Home </a>
<a href="blogs" class="blogsbutton"> Blogs </a>
<a href="contact" class="contactbutton"> Contact </a>
</div>


<style>
.upper{
    background-color: black;
    height: 40px;
    position: absolute;
    top: 0%;
    left: 0%;
    right: 0%;
}

.blogtitle {
    text-align: center;

}
.name {
    text-align: center;
    font-weight: bolder;
    font-size: larger;
}
.text {
    text-align: center;
    font-size: large;
}
.homebutton {
    font-family: 'Roboto', sans-serif;
    position: absolute;
    top: 10px;
    left: 29%;
    text-decoration: none;
    color: azure;
}
.blogsbutton {
    position: absolute;
    left: 48%;
    top: 10px;
    font-family: 'Roboto', sans-serif;
    color: azure;
    text-decoration: none;
}
.contactbutton {
    left: 68%;
    position: absolute;
    top: 10px;
    font-family: 'Roboto', sans-serif;
    color: azure;
    text-decoration: none;
}
.homebutton:hover {
    color: yellow;
}
.blogsbutton:hover {
    color: yellow;
}
.contactbutton:hover {
    color: yellow;
}
</style>

您应该包括 basic.html 而不是 extends

{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Do</title>
</head>
<body>
{% include "basic.html" %}
    <p> Help </p>    
</body>
</html>

仔细阅读documentation