Opened 4 years ago

Last modified 11 months ago

#18914 assigned New feature

Add a way to add items to the admin's object tools using Python code

Reported by: mcrute Owned by: Asif Saifuddin Auvi
Component: contrib.admin Version: master
Severity: Normal Keywords: admin object-tools
Cc: marc.tamlyn@…, markus.magnuson@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Adding object tools requires template overrides or subclassing of ModelAdmin. It should be possible to add object tools in the same way that admin actions can be defined.

Change History (7)

comment:1 Changed 4 years ago by mcrute

There is a patch for this with documentation on GitHub https://github.com/django/django/pull/328

comment:2 Changed 4 years ago by Marc Tamlyn

Cc: marc.tamlyn@… added
Needs tests: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted
Type: Cleanup/optimizationNew feature

I like the idea - I definitely think this is something the admin could do with making easier to customise (having hacked it a few times...)

It needs tests, as it currently has none. It'll probably need quite a lot - all of the individual functions will need testing. Does the test suite still work with the current changes? Docs wise it has some, but they if merged it would need to be added to the release notes as well.

Seems to me the view on site link should also be converted to be one of these new tool objects.

comment:3 Changed 21 months ago by Asif Saifuddin Auvi

Owner: changed from nobody to Asif Saifuddin Auvi
Status: newassigned

comment:4 Changed 13 months ago by Tim Graham

Summary: Object tools improvementsAdd a way to add items to the admin's object tools using Python code

#25776 is a duplicate.

comment:5 Changed 13 months ago by Manel Clos

Nice, also see this project solving the issue: https://github.com/praekelt/django-object-tools

comment:6 in reply to:  5 Changed 13 months ago by Asif Saifuddin Auvi

Replying to manelclos:

Nice, also see this project solving the issue: https://github.com/praekelt/django-object-tools

are you planning to work on this ticket?

comment:7 Changed 11 months ago by Markus Amalthea Magnuson

Cc: markus.magnuson@… added
Note: See TracTickets for help on using tickets.
Back to Top