Hi Eduardo,
As always I appreciate your help. I have tried following the example of the 
documentation, as you have recommended me. The code would be something like 
the following, but it also doesn't work with delete_model. Instead with 
save_model has worked perfectly in both cases.

class RichTextPageAdmin(PageAdmin):
    def delete_model(self, request, obj):
        # do something
        super(RichTextPageAdmin, self).delete_model(request, obj)



Il giorno giovedì 19 ottobre 2017 21:29:54 UTC+2, Rainell Dilou Gómez ha 
scritto:
>
> Hello everyone
> I tried to override "RichTextPageAdmin" to use the *save_model* and 
> *delete_model* methods when creates or deleted RichText type pages. The 
> code would be something like this
>
> class RichTextPageAdmin(PageAdmin):
>
>     def delete_model(self, request, obj):
>         # do something
>         return PageAdmin.delete_model(self, request, obj)
>
>     def save_model(self, request, obj, form, change):
>         # do something
>         return PageAdmin.save_model(self, request, obj, form, change)
>
> if RichTextPage in admin.site._registry:
>     admin.site.unregister(RichTextPage)
> admin.site.register(RichTextPage, RichTextPageAdmin)
>
> So, when I saw that the test worked only with the save_model method, I 
> noticed that the delete_model method does not exist in the PageAdmin class.
> So I'm wondering, how can I execute a code when a RichText type page is 
> deleted?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to