你当然可以.一个base.html的快速示例
<!DOCTYPE html>
<html>
<head>
<title>My Project</title>
</head>
<body>
{% block content %}{% endblock content %}
</body>
</html>
假设你有一个名为myapp的应用程序,有一个视图.html页面,
{% extends "base.html" %}
{% block content %}
<h2>Content for My App</h2>
<p>Stuff etc etc.</p>
{% endblock content %}
花些时间到read the docs了解更多信息