Reputation: 311
I have a application that i exclusively use with the admin.
I would like to send an email every time that a new object is created/modified, from my search, it seems that using the post_save would be the best way.
Unfortunately the doc is not really clear on that...
Can someone explain me > maybe with an example ?
Thanks
Upvotes: 2
Views: 5056
Reputation: 3046
There are two ways. Either override the save function or use signals.
See the following excellent posts:
For a simple similar example using save have a look at my previous answer: Send an e-mail notification when a Django CharField is modified via the admin site
Upvotes: 8