[Django] #36334: Django admin {% block object-tools %} no longer displayed in 5.2

12 views
Skip to first unread message

Django

unread,
Apr 18, 2025, 10:35:56 AM4/18/25
to django-...@googlegroups.com
#36334: Django admin {% block object-tools %} no longer displayed in 5.2
-------------------------------------+-------------------------------------
Reporter: Caram | Type: Bug
Status: new | Component:
| contrib.admin
Version: 5.2 | Severity: Normal
Keywords: admin object tools | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Steps to reproduce:
- override block object-tools in an app specific template (see below)

Expected results:
- the buttons in the object tools block are displayed

Actual results:
- up to 5.2.a1: the buttons are displayed as expected
- 5.2.b1, 5.2.rc1, 5.2: the buttons are no longer displayed. Even though
the template is evaluated, the buttons don't even appear in the page
source code


{{{
@admin.register(Test)
class PremiumAdmin(admin.ModelAdmin):
change_list_template = 'admin/my_app/change_list.html'

}}}


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

{% block extrahead %}
{{ block.super }}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/5.15.4/css/all.min.css">
{% endblock %}

{% block object-tools %}
<ul class="object-tools">
<li>
<a href="/test/" class="viewlink"><i class="far fa-calendar-
alt"></i>&nbsp;&nbsp;Dates</a>
</li>
{% endblock %}
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36334>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 18, 2025, 8:50:38 PM4/18/25
to django-...@googlegroups.com
#36334: Django admin {% block object-tools %} no longer displayed in 5.2
------------------------------------+--------------------------------------
Reporter: Caram | Owner: (none)
Type: Bug | Status: new
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: admin object tools | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------------+--------------------------------------
Comment (by Antoliny):

Thank you for the report Caram! I think this is likely a duplicate of that
ticket. [https://code.djangoproject.com/ticket/36331 #36331]
--
Ticket URL: <https://code.djangoproject.com/ticket/36334#comment:1>

Django

unread,
Apr 19, 2025, 11:53:03 AM4/19/25
to django-...@googlegroups.com
#36334: Django admin {% block object-tools %} no longer displayed in 5.2
------------------------------------+--------------------------------------
Reporter: Caram | Owner: (none)
Type: Bug | Status: closed
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution: duplicate
Keywords: admin object tools | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------------+--------------------------------------
Changes (by Clifford Gama):

* resolution: => duplicate
* status: new => closed

--
Ticket URL: <https://code.djangoproject.com/ticket/36334#comment:2>
Reply all
Reply to author
Forward
0 new messages