我已经设置Django的引导下面的一些教程,但即使当我在教程中做相同的Django没有找到静态文件。Django引导文件没有找到
我的项目具有以下结构:
webshop
shop
migrations
templates
...
static
css
bootstrap.min.css
...
webshop
...
db.sqlite3
manage.py
在我加入
STATIC_URL = '/static/'
而在我的index.html加载与下面的代码的静态文件中的数据settings.py:
<head>
<title>Webshop</title>
{% load staticfiles %}
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css"/>
</head>
但Django无法找到数据bootstrap.min.css。
你可以用'{%load static%}'替换'{%load staticfiles%}'吗?同时结帐[doc](https://docs.djangoproject.com/en/1.11/howto/static-files/)了解如何加载静态文件。 –
取代它,但仍然不起作用。 – Meister96Fels