django rest framework 的api返回html
return Response(data=serializer.data, status=status.HTTP_200_OK, content_type="application/json")
content_type="application/json"去掉,写成:
return Response(data=serializer.data, status=status.HTTP_200_OK)即可
return Response(data=serializer.data, status=status.HTTP_200_OK, content_type="application/json")
content_type="application/json"去掉,写成:
return Response(data=serializer.data, status=status.HTTP_200_OK)即可