class Publish(APIView): def get(self, request): publish_list = models.Publish.objects.all() bs = MySer.PublishSerializer(publish_list, many=True) return JsonResponse(bs.data, safe=False, ) # 当返回的中文是乱码时,这时由于ascii码的原因,JsonResponse()在初始化的时候使用了json.dumps…