I think you want to use a message structure.
In the admin action:
class FooAdmin(admin.ModelAdmin): .... def foo_action(self, request, queryset): .... self.message_user(request, "%s foo objects were not saved" % foos_not_saved)
In shape (model):
def save(*args, **kwargs): # do stuff self.message_user(request, "%s fields were not saved" % ','.join(fields_not_saved))
source share