> > I usually do this by setting up a method to return an HTML link to a custom > admin page, referencing that in the list_display tuple: > > class MyModelAdmin(admin.ModelAdmin): > list_display = ('name', 'action_link') > > def action_link(self, obj): > return "<a href='%s'>Do action on this object</a>" % > reverse('action_view', args=(obj.pk,)) > action_link.allow_tags = True
Thanks, this works. My idea did not, since it was nesting a form inside a form and things got confused. In your solution, how do you redirect from the view to the admin? HttpResponseRedirect(request.get_full_path()) and HttpResponseRedirect(request.META.get(‘HTTP_REFERER’) both redirect me to the action_view url not the admin page i came from. Thanks again!
smime.p7s
Description: S/MIME cryptographic signature