尝试使用django加载时找不到CSS文件



我的CSS文件找不到了,我试图加载它,为了修复它,我在网上尝试了很多不同的解决方案,但似乎不知道为什么,我的静态和模板与项目以及manage.py文件都在同一个文件中。

对于我的设置文件

'django.contrib.staticfiles'
STATIC_URL = '/static/'

在我的基本html中,我有

{% load static %}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The css file can be modified for every template if required -->
{% block style_css %}
<link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}" />
{% endblock %}
<title>Website Homepage Design Prototype #1</title>
STATICFILES_DIRS = (os.path.join(BASE_DIR, "static"),)

STATIC_URL下面加上这一行,它肯定可以