在同一页面上显示块标题,但不显示块内容

时间:2020-11-10 18:18:14

标签: django django-templates

正在渲染{% block title %},因此 Test 会显示在页面上,并且当我更改其中的内容时也会更改。但是,无论我用{% block content %}做什么,内容都不会显示在页面上。

我原本以为它们要么都不显示,要么都不显示。

为什么只显示一种块类型而不显示另一种?

<!-- templates/registration/password_reset_complete.html -->
{% extends 'base.html' %}

{% block title %} Test {% endblock %}

{% block content %}
<div id="content" class="colM">
    <p>We've emailed a new password to the e-mail address you submitted. You should be receiving it shortly.</p>
    <p> You can log in now on the <a href="{% url 'login' %}">log in page</a>.</p>
    <h1>Password reset sent</h1>
    <br class="clear">
</div>
{% endblock %}

0 个答案:

没有答案