I just tried that and I didn't have any luck. As a sanity check, does this look right:
==== class PersonAdmin(admin.ModelAdmin): form = PersonAdminForm def delete_view(self, request, object_id): print 'it worked' ==== When I click the Delete button, I would expect to see "it worked" in my logs. Unfortunately, no such luck. On Jun 18, 4:55 pm, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Jun 18, 9:41 pm, "huu...@gmail.com" <huu...@gmail.com> wrote: > > > On Django's admin pages, I'd like to perform an action when the > > administrator clicks the Delete button for an object. In other words, > > I'd like to execute some code prior to arriving on the "Are you sure?" > > delete confirmation page. > > > I realize I could override the template page for this object, but I > > was hoping for something easier (i.e., override a method on the model > > or the form). > > > Any thoughts? > > The method you need to override is on the ModelAdmin class, and is > called delete_view. Look in django.contrib.admin.options for the > original. > -- > DR. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---