函数里面return response问题:
1、没有
2、写错
3、位置错
例如:
return Response('确认成功')
2023-07-29编程代码下载本文AssertionError,expected,Response
函数里面return response问题:
1、没有
2、写错
3、位置错
例如:
return Response('确认成功')
《AssertionError: Expected a `Response`, `HttpResponse` or `HttpStreamingResponse` to be returned from.doc》
下载本文的Word格式文档,以方便收藏与打印。
用到@api_view装饰器时,访问路由查看api数据时,报错: AssertionError: Cannot apply DjangoModelPermissionsOrAnonReadOnly on a view that does not set `.queryset` or have a `.get_queryset()` method. 按...
2023-05-16编程教程AssertionError,笔记,错误