[Django]-How to complement the block of parent template?

4👍

You can make use of {{ block.super }} [Django-doc] here when you want to render the original content as well. For example:

{% extends 'first.html' %}
{% block content %}
{{ block.super }}
this text is from second.html
{% endblock %}

Leave a comment