Django: customizing the message after a successful form save

Posted by chiurox on Stack Overflow See other posts from Stack Overflow or by chiurox
Published on 2010-12-28T18:21:25Z Indexed on 2010/12/28 19:53 UTC
Read the original article Hit count: 380

Hello, whenever I save a model in my Admin interface, it displays the usual "successfully saved message." However, I want to know if it's possible to customize this message because I have a situation where I want to warn the user about what he just saved and the implications of these actions.

class PlanInlineFormset(forms.models.BaseInlineFormset):
    def clean(self):
        ### How can I detect the changes?  
        ### (self.changed_data doesn't work because it's an inline)
        ### and display what he/she just changed at the top AFTER the successful save?

class PlanInline(admin.TabularInline):
    model = Plan
    formset = PlanInlineFormset

© Stack Overflow or respective owner

Related posts about django

Related posts about django-admin