[Answered ]-Django – Avoid saving unchanged object in admin

2👍

You could probably write a custom admin form and subclass it for every admin-editable entity where, in the save() it looks at all fields which aren’t the last_modified_date (I’m assuming you’ve got this consistently named across your models) and if there are no changes, doesn’t call super(YourAdminFormClassNamehere, self).save(*args, **kwargs) but if there are changes to any of those fields, it does.

(It’s a weekend, else I’d probably add some example code. This should get you on a useful track, though.)

Leave a comment