Override a template of a Django package

How can I override a change_list.html template of a Django package e.g Django import export, in an existing Django app.

E.g I want to override this package template, this is what I did in my project.

path to the file : app/templates/import_export/change_list.html

{% extends 'import_export/change_list_export.html' %}

{% block object-tools-items %}
    <div>
        Hello there
    </div>
{% endblock %}

I get this error :

enter image description here

path to the file of your app : app/templates/import_export/change_list.html this is the path to normal view. Not admin view.

path in git repository: app/templates/admin/import_export/change_list.html this is the path to admin view.

I understand - you use django.admin. In this case you should add admin folder in templates folder.

Back to Top