A
A
Artyom Eliseikin2019-09-15 10:23:54
Django
Artyom Eliseikin, 2019-09-15 10:23:54

How to name a tab in Django framework?

This is the file: base.html

<!DOCTYPE html>
<html lang="ru">
<head>
  <meta charset="UTF-8">
  <title>{% block title %)Мой сайт{% endblock %}</title>
</head>
<body>

  {% block content %}{% endblock %}

</body>
</html>

This is the file: list.html
{% extends 'base.html' %}

{% block title %}Последние статьи{% endblock %}

{% block content %}

  Блабла ...

{% endblock %}

This is the file: views.py
from django.shortcuts import render

def index(request):
  return render(request, 'articles/list.html')

It gives an error in the browser: 5d7de6a80a0f3165466173.jpeg
I searched in the browser and found nothing :(
Can anyone help?
If you need something else, please write.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
smsi, 2019-09-15
@fhetushr

{% block title %) My site - the right bracket is wrong, it should be %}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question