I had a question: In the example shared describing the replacement of signals with overriding of the save() method:
How do we implement a similar approach to decrement the number of articles written by an author, in the case where a post is deleted by an author?
I am a software engineer, student, and web developer currently living in Pokhara, Nepal. My interests range from design to technology. I am also interested in entrepreneurship, reading, and cycling.
Really interesting article!
I had a question: In the example shared describing the replacement of signals with overriding of the
save()
method:How do we implement a similar approach to decrement the number of articles written by an author, in the case where a post is deleted by an author?
Thanks
Edit: Fixed markdown syntax
For that we can use the
delete()
model method, and create the_delete_post_writing
and decrement the count.