Usando block para criar blocos de posts e home

This commit is contained in:
Luiz Otávio
2023-04-25 08:35:45 -03:00
parent 71036bfd44
commit f7949c7030
3 changed files with 11 additions and 2 deletions

View File

@@ -3,8 +3,9 @@
<h1>{% block texto %}{% endblock texto %}</h1>
<main class="posts">
{% include 'global/partials/postblock.html' %}
<main class="content">
{% block posts %}{% endblock posts %}
{% block home %}{% endblock home %}
</main>
</body>

View File

@@ -1,3 +1,7 @@
{% extends 'global/base.html' %}
{% block texto %} {{ text }} {% endblock texto %}
{% block posts %}
{% include 'global/partials/postblock.html' %}
{% endblock posts %}

View File

@@ -3,3 +3,7 @@
{% block texto %}
{{ text }}
{% endblock texto %}
{% block home %}
<h1>HOME</h1>
{% endblock home %}