[Fixed]-Extending Django Admin templates

1👍

This should work:

{% extends "admin/change_form.html" %}

{% block field_sets %}

    {{ block.super }}
    <h1>HELLO</h1>

{% endblock %}

You must call the block from the source change_form.html template. Do that with {{ block.super }} as shown above. You can, of course, reverse the order between super and h1 according to your needs.

👤nik_m

Leave a comment