1. 程式人生 > >django rest framework 的api返回html

django rest framework 的api返回html

data urn resp color serialize ont eight ria style

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)即可

django rest framework 的api返回html