Django anchor app-based html to project-based html
У меня есть файл base.html в файле project/templates и я пытаюсь привязать к нему html-файл, основанный на приложении.
Я получаю следующую ошибку:
Reverse for 'tcm_home' not found. 'tcm:tcm_home' is not a valid view function or pattern name.
Файл tcm_home.html является моим "tcm" приложением html и наследуется от файла base.html
Что я делал/пробовал:
- назвал my_app = 'tcm' в моем файле urls.py в приложении tcm
- привязал каталог шаблонов моего проекта к BASE_DIR
- проверил, наследует ли tcm-home.html (основанный на приложении) от base.html (основанный на проекте)
{% load static %}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" type="image/png" href="{% static 'tcm/cover.png' %}" />
<title>HEAT TRANSFER SITE</title>
</head>
<body style="background-color: aqua;">
<h1 style=" color:darkblue">THIS IS IT!</h1>
<h1><a href="{% url 'tcm:tcm_home' %}"></a>goto TCM</h1>
{% block content %} {% endblock %}
</body>
</html>