Answers for "customise the django rest api view"

0

customise the django rest api view

def update(self, request, *args, **kwargs):
    data = request.DATA
    qs = Student_academic_program.objects.filter(student=2773951)
    serializer = StudentAcademicProgramSerializer(qs, data=data, many=True)

    if serializer.is_valid():
        serializer.save()

        return Response(serializer.data)

    ...
Posted by: Guest on August-10-2021

Python Answers by Framework

Browse Popular Code Answers by Language