获取页面内容时content转码 获取页面内容时content转码转码转码context返回的是bytes型也就是二进制的数据,要把它转为utf-8。from django.test import Clientc = Client()response = c.get('http://127.0.0.1:8000/hello/')response.content结果:b'hello world!'str(resp...