In my very simple learning application, I would like to trigger some logic the moment that a model changes to 'complete'. Specifically, I pass the following payload to my viewset:
{
complete: true
}
which is as follows:
class TestQuestionViewset(viewsets.ModelViewSet):
queryset = TestQuestion.objects.all()
serializer_class = TestQuestionSerializer
I would like to trigger some logic server side that is triggered as soon as the complete flag is updated.
Could I override the update method? If so, how could I do this?
try this