django-lifecycle icon indicating copy to clipboard operation
django-lifecycle copied to clipboard

Allow triggering a hook when ANY field changes

Open WhyNotHugo opened this issue 5 years ago • 3 comments

This small change allows triggering a hook when any field for a model changes.

Unlike when_any, this doesn't require enumerating all fields, which can be a pain for very large model, and it can be very easy to forget about fields when adding them to the model.

Docs and tests should clarify any final details around this.

WhyNotHugo avatar Jul 13 '20 11:07 WhyNotHugo

Hang on, tests for this are wrong, need to rework them.

WhyNotHugo avatar Jul 13 '20 11:07 WhyNotHugo

@rsinger86: This PR is a quite outdated now but I was curious if the change is still on the table. Can we breathe new life into this or would it be dead-on-arrival. ;)

emiel avatar Jun 28 '22 13:06 emiel

I'm no longer working on the project where we used this, so I don't think I'll be picking it up any time soon. Feel free to adopt this PR if you're interested.

WhyNotHugo avatar Jun 28 '22 13:06 WhyNotHugo