When an update/create is performed on a Django model (.save()
) I would like to be able to \"step in\" and compare some particular attributes to what they were set t
While I very much approve of Sébastien Piquemal's answer I ultimately ended up using both the pre_save
and post_save
signals. Instead of overriding __init__()
, I do something very similar in pre_save
, and then check/compare the values in post_save
and emit a custom signal from there if certain conditions are met.
I think I'll still accept his answer, for the time spent on it. I don't see where we're doing much different, except I'm doing my work in a signal and he's doing it during initialization.