In my DJango application I'd like to implement a system so that when the email
field in my jmodel, MyModel
is changed, an email is sent to that email address. I have a ModelForm on this Model of mine. How and how should I implement this?
- Should I override the
save()
method of my ModelForm and send the email there? - Should I try and try an trap some kind of model updated signal and send the email there — if so, how? What signal shoudl I be trapping?
What is a good way to check that the email was changed. This itself is a trivial thing to implement but I'd like the code to reside it it's rightful place.
Thanks
Checking if a field was changed: Django: When saving, how can you check if a field has changed?