Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)

    ...
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #customise #django #rest #api #view
ADD COMMENT
Topic
Name
6+6 =