Opened 3 years ago

Closed 3 years ago

#25776 closed Uncategorized (duplicate)

Generic way in the admin to add tools to object-tools-items

Reported by: Manel Clos Owned by: nobody
Component: contrib.admin Version: 1.8
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

If you have two different apps that affect the admin, say django-reversion and django-import-export, depending on the Mixins order in your ModelAdmin definition you will get the tool button for one or the other. As this works by extending the "admin/change_list.html" template and extending the "object-tools-items" block, only the last one processed gets into the final template.

If this was a ModelAdmin method like get_object_tools_items_html(), then it would be chainable.

Change History (2)

comment:1 Changed 3 years ago by Manel Clos

Component: Uncategorizedcontrib.admin

comment:2 Changed 3 years ago by Tim Graham

Resolution: duplicate
Status: newclosed

Duplicate of #18914

Note: See TracTickets for help on using tickets.
Back to Top