Opened 17 years ago

Closed 17 years ago

#5412 closed (duplicate)

Add actions to models in admin interface

Reported by: alessandro.ronchi@… Owned by: nobody
Component: contrib.admin Version: dev
Severity: Keywords: admin, save(), action, meta
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It would be a great feature the possibility to add a button with an action near "save", "save and...", and call a method on the model.
If one instance needs some elaboration after save, the only possibility now is to add to the save() function that code. But if that involves ManyToMany fields the game is over, the field is empty in save() and you can do nothing.

with an action I could add the functionality to a new method, and call it wh<enewer I need just opening the admin and findind the needed instance of my model.
It would increase the possibility for the developer.

You could send, for example, an email with the object, reload or recalculate automagically some fields, and so on.

I thing it would be easy to add in the model (just add an attribute like ordering with the name of the method/s to call) and in admin interface (just look in the model like it do for "view in site"

Change History (1)

comment:1 by James Bennett, 17 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #2409 and #3059, and the latter of those is likely to be made obsolete by newforms-admin.

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