You can override the save method on your serializer or on the model.
On Sunday, June 28, 2020 at 1:14:37 AM UTC-5, Muhammad Bashir Al-Noimi
wrote:
>
> Hi,
>
> How can I call a function after a successful POST?
>
> Below a simple contact example I want to run a function called
> contact_added() a
I understand that you can go about solving it this way, but it seems like a
lot of extra work when it just works the way you would expect on a Django
ModelForm. I'm guessing this isn't possible for it to "just work", so I
might end up making an issue in the DRF project.
On Saturday, June 27, 20