I can't copy content from an html tag into another django template

Good night friends. I'm trying to display the content of a tag in a template, in another template, using the django "extends" method. Works perfectly with when it comes to "normal", "typed" content:

this works:

{% block part_of_site %}
   <div id='tag2'>Context</div>
{% endblock %}

using a variable, you can't copy to another template:

{% block part_of_site %}
   <div id='tag2'>{{ variable }}</div>
{% endblock %}
Back to Top