为何Django Rest Framework APIRequestFactory不支持DELETE方法的query_params?

问题描述 投票:5回答:1

在我的一种观点中,我正在APIView delete方法中传递其他数据作为查询参数。我可以在视图中使用request.query_params来获取相同的内容。但是,当我尝试使用DRF APIRequestFactory进行测试时,数据为空。进一步挖掘APIRequestFactory代码可知,它仅查看request.data,而不查看QUERY_STRING。这种行为是否有任何特定原因?

django django-rest-framework http-delete
1个回答
0
投票

这是github上的一个未解决问题,尚未解决。https://github.com/encode/django-rest-framework/issues/6488

© www.soinside.com 2019 - 2024. All rights reserved.