errorDRF操作错误ValueError:Content-Typeheaderis"text/html",not"application/json"----------------------------------------------------------------Traceback(最近调用最后):文件“C:\Users\17293\Desktop\Coder\Python\Django\twitter\newsfeeds\api\tests.py”,行41、在test_listprint(response.json())文件“C:\Users\17293\AppData\Local\Programs\Python\Python39\lib\site-packages\django\test\client.py”,第662行,在_parse_jsonraiseValueError(ValueError:Content-Type标头是“text/html”,而不是“application/json”------------------------------------------------------------------在0.362sFAILED(errors=1)Destroyingtestdatabaseforalias'default'...错误原因及解决方法:去urls.py文件添加路由配置
