Заголовок блока в дочернем шаблоне не переопределяется

Я пытался наследоваться от шаблона base.html моего приложения, но когда я переопределяю заголовок блока в дочернем шаблоне, он не отображается. Я читал и читал документацию, но я не понимаю, что я делаю неправильно.

Ниже приведен мой код:

Base.html

<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" 
rel="stylesheet" integrity="sha384- 
EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<title>{%block title %} {%endblock%}</title>    
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" 
 ntegrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" 
 crossorigin="anonymous"></script> 

{%block content %} {%endblock content %}
</body> 

Childtemplate,

{% extends 'simple_investing/base.html' %}
<head>
<title>{% block title %} Welcome to Simple Investing {% endblock%}</title>
</head>
{%block content%} 
<body>    
<br>
<p style = "font-style: normal">This website has the goal of assisting <strong><em>you</em> 
</strong> in the process of making <strong><em>sound investment decisions</em></strong> in the 
<i>stock market</i>. In order to accomplish this goal we focus on:</p> 
<ul>
    <li><p> Basic concepts that everyone should know before making an investment.</p></li>
    <li><p> Providing the tools necessary to analyze the fundamentals of any public company. 
You can create a portfolio of companies that you are interested in.</li><p>
</ul>    
<br>
<p>Let's start by learning the main <a href ="http://127.0.0.1:8000/concepts">concepts.</a> 
</p>
<p>If you already have a foundation on the matter, you can start by <a href = "{% url 
'simple_investing:create_company' %}">adding</a> companies to your portfolio and evaluate 
 them.</p>

</body>

{% endblock content%}

Есть подсказки?

Вернуться на верх