【发布时间】:2019-05-24 07:19:32
【问题描述】:
在扩展之前我检查了所有连接和文件路径,但在扩展我的子代码后消失了
base.html
<!DOCTYPE html>
{% load staticfiles%}
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="icon" type="image/x-icon" href="{% static '/images/icon.png' %}" />
<title>allgood.com</title>
<link href="{% static "/css/base.css" %}" rel="stylesheet"
type="text/css"/>
</head>
<body>
<div class="header">
<span class="name">allgood</span>
<button class="btn1 ">Resume</button>
<button class="btn2 ">resume</button>
<span class="profileimage"><img src="{%static '/images/profile1.png'
%}" style="width:40px;height:40px"></span>
</div>
</body>
</html>
技能.html
{% extends 'app/base.html' %}
{% block content %}
<p>skills</p>
<p>skills</p>
<p>skills</p>
{% endblock %}
【问题讨论】:
-
但是你的base.html中没有添加{% block content %}和{% endblock %}
标签: html django django-templates django-views