4π
β
I donβt think admin actions
are the best fit in this case.
Actions are
simple functions that get called with a list of objects selected on the change list page
With the buttons you describe however, you want to operate on a single row/instance.
Therefore I would simply create a custom url endpoint for your ModelAdmin
which is called when you press the button and which handles the desired action.
This article has quite a comprehensive overview how this can be done in detail.
π€arie
Source:stackexchange.com