def save(self, latest_update_at): changed = False # if inserting don't add the latest update at if self.id is None: super(Match, self).save() # otherwise check if any fields have changed for field in self._meta.get_all_field_names(): if changed: continue old_value = getattr(self.__class__._default_manager.get(id=self.id), field) new_value = getattr(self, field) if new_value != old_value: changed = True if changed: self.latest_update_at = datetime.now() super(Match, self).save()