I'm trying to create blocks inside my base template (index.html), but apparently the block is not used.
index.html
{% load static %}
<!DOCTYPE html>
<html lang="pt-br">
<head>
<title>Portfolio's</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{% static 'content/css/bootstrap.css' %}">
<link href="https://fonts.googleapis.com/css?family=Lobster|Oswald|Port+Lligat+Slab" rel="stylesheet">
.
.
.
<div class='container'>
<div class='row'>
<div id='artigo' class='col-lg-8'>
{% block corpo_artigo %}
{% endblock %}
.
.
.
When I call it in a separate file, it does not take effect
body_article.html
{% extends "index.html" %}
{% block corpo_artigo %}
{% for item in conteudo_artigo%}
{% if item.photo %}
<img src="{{item.photo}}" class="img-responsive" alt="...">
{% endif %}
<a id='titulo' href="/artigos/{{item.id}}"><h1>{{item.titulo}}</h1></a>
<h5 id ='autor'>{{item.autor}}</h5>
<h5 id ='tag'>{{item.tag}}</h5>
{% if item.corpo|length > 1000 %}
<p id = 'corpo_artigo'>{{item.corpo|truncatewords:200|safe}}</p>
<button class="btn btn-default navbar-btn"> <a href="/artigos/{{item.id}}">Continue lendo</a></button>
{% else %}
<p>{{item.corpo}}</p>
{% endif%}
<h5 id ='data'>{{item.data}}</h5>
{% endfor %}
{% endblock %}
Obs I'm using a directory called templates using:
'DIRS': [os.path.join(BASE_DIR, 'templates')],
EDIT: I noticed that the {% extends "index.html"%} tag works normally, but everything I put inside the {% block% does not work.