To illustrate my question more clearly, let's suppose I have a include.html template with content:

{% block test_block %}This is include{% endblock %}

I have another template called parent.html with content like this:

This is parent

{% include "include.html" %}

Now I create a templated called child.html that extends parent.html:

{% extends "parent.html" %}
{% block test_block %}This is child{% endblock %}

My idea is that when rendering child.html, the test_block in child.html can overwrite the one in include.html. As per my understanding, when a template is included, it is included as it is. So in my case, I think parent.html equals to:

This is parent

{% block test_block %}This is include{% endblock %}

So child.html should be able to overwrite test_block. But looks like it can't. Why? Is there a workaround?

Edit
Report