1 2 3 4 5 6 7 8 9 10 11
| def partial_update(self, request, pk=None): instance = self.get_object() serializer = ArticleCreateSerializer( instance, data=request.data, partial=True, ) serializer.is_valid(raise_exception=True) newer = serializer.save() newSD = ArticleSerializer(newer, context={'request': request}) return Response(newSD.data)
|