Rebrand change_list.html
Learn to customize the Django model change page.
We'll cover the following...
Rebranding change_list.html
If you click on a model the change_list.html
page is displayed. You will learn how to rebrand it in this lesson. Starting offStarting off, you will need to adapt the HTML code of the change_list.html
file located in sample_app/templates/admin/sample_app/
.
Your focus will be on the top of the page and to modify the search and «Add question» options.
The «Add question» link is in the object-tools-item
block .
{% block object-tools %}
<ul class="object-tools">
{% block object-tools-items %}
{% change_list_object_tools %}
{% endblock %}
</ul>
{% endblock %}
Its value is derived from {% change_list_object_tools %}
...