I've got several ModelAdmin classes and I'd like to do the same action when save the model so I created mixin object for this purpose:
class SaveModelMixin(object):
def save_model(self, request, obj, form, change):
if obj.is_executed and 'is_executed' in obj.changed_data:
obj.date_execution = datetime.date.today()
super(self.__class__, self).save_model(request, obj, form, change)
And when I try to save object in admin, this method just runs itself again and again, and I can't figure out why.