Admin-Actions also in the object details view

603 views
Skip to first unread message

Roman Glebov

unread,
Dec 30, 2009, 4:02:46 PM12/30/09
to django-d...@googlegroups.com
Hallo everyone,

there is a very comfortable api for adding actions to the model admin in
the admin site.

These actions are then integrated into the admin's object list view of
the given model type in the admin area.

It seems to be also very logical to provide a way of showing these actions
in the object detail view.

This would be also very comfortable because it would not require a
django developer to override the object detail view template.
And would make django development more object oriented: it would require
to define all specific actions in the admin model.

I will try to develop the required functionality.

With best wishes
Roman Glebov

andybak

unread,
Dec 31, 2009, 6:18:04 AM12/31/09
to Django developers
I can see some benefit in consistency here but what do you do about
saving the current object?

This is a problem in general with any actions performed on the same
screen a change form.

1. User enters the object detail view
2. User changes a field
3. User selects an action.

Does the action apply to the saved or unsaved state? If the former
then the admin must warn that the object will be saved before
performing the action whereas the latter option would be rather
confusing (do we keep or drop the changes?)

In general I don't think performing actions on an object makes sense
in 'edit' mode and there is no details view in the Django admin other
than an 'edit' mode.

Florian Apolloner

unread,
Dec 31, 2009, 8:32:31 AM12/31/09
to Django developers
There is already a ticket for this request: http://code.djangoproject.com/ticket/12090

Cristiano Coelho

unread,
Jul 10, 2016, 6:32:47 PM7/10/16
to Django developers (Contributions to Django itself), ro...@glebov.de
Sorry to bring this up (quite a few years old already)

Are there any plans to bring this to life? The ticket seems to have died as well.
It could be very useful to have actions re used on the detail view page somehow. Right now the only option is to override the template.

Tim Graham

unread,
Jul 10, 2016, 8:07:39 PM7/10/16
to Django developers (Contributions to Django itself), ro...@glebov.de
I haven't seen any other activity on the idea if that's what you're asking. There aren't any formal plans for Django development... the direction is steered by the patches that people contribute.

Alex Riina

unread,
Jul 11, 2016, 7:55:17 AM7/11/16
to Django developers (Contributions to Django itself)
Here's an implementation:

https://github.com/crccheck/django-object-actions

Combining with other admin plugins that change the template requires overriding the template to fit both changes in.

The actions are GETs and have no card protection.

Alex Riina

unread,
Jul 11, 2016, 8:47:46 AM7/11/16
to Django developers (Contributions to Django itself)
s/card/csrf/

autocorrect grabbed that one from me.

Cristiano Coelho

unread,
Jul 11, 2016, 6:31:46 PM7/11/16
to Django developers (Contributions to Django itself)
Thanks, I guess that can do it for now. It's a shame the one who started implementing this in django itself just abandoned it :(
Reply all
Reply to author
Forward
0 new messages