I could have sworn I’d read a question about this before, but I can’t find it, so:
In Django, how can I run some code when a new model instance is saved to the database?
I know I can write a custom MyModel().save() method to run some code whenever a model instance is saved. But how can I run code only when a model instance is saved for the first time?
Django documentation was hard for me to grok at first, here’s a more explicit example