0

i'm new to DRF, and have a simple question on where to locate some buisness logic.

I have a ModelSerializer, when there is a update request i want to send a push/ email. where should i place that logic.

In the update method or validate method., or another place?

1 Answer 1

1

I personally like to use the signals provided by Django - in your case you'd need to listen to a post_save signal coming from your particular model and on that function you can then trigger the push/email actions.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.