Opened 12 years ago

Last modified 7 years ago

#18914 new New feature

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

Reported by: Mike Crute Owned by: nobody
Component: contrib.admin Version: dev
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 (6)

comment:1 by Mike Crute, 12 years ago

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

comment:2 by Marc Tamlyn, 12 years ago

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:4 by Tim Graham, 8 years ago

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

#25776 is a duplicate.

comment:5 by Manel Clos, 8 years ago

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

in reply to:  5 comment:6 by Asif Saifuddin Auvi, 8 years ago

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 by Markus Amalthea Magnuson, 8 years ago

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