这是我的 home.html 我无法显示 static/images/ 文件夹中的图像。虽然 *[09/Mar/2020 15:52:09] "GET /static/images/mona.jpg HTTP/1.1" 404 1669 * 显示在终端中。
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{% block content %}
{% load static %}
<title>Home</title>
<link rel="stylesheet" href={% static '/css/style.css' %} />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous" />
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
</head>
<body>
{% include "includes/header.html" %}
<div class="pt-5">
<div class="card d-inline-block">
<img src={% static 'images/mona.jpeg' %} alt="Avatar" style="width:100%;">
<div class="container">
<h4><b>Mona Lisa</b></h4>
<p><a href="#">Architect & Engineer</a></p>
</div>
</div>
<div class="card d-inline-block">
<img src={% static "images/mona.jpg" %} alt="Avatar" style="width:100%">
<div class="container">
<h4><b>The Scream</b></h4>
<p><a href="#">Architect & Engineer</a></p>
</div>
</div>
</div>
{% include "includes/footer.html" %}
{% endblock content %}
</body>
慕的地6264312
侃侃尔雅
牛魔王的故事
相关分类