发布于 2021-06-01 03:27:07
可以为APIView指定权限类。
class DuckList(APIView):
permission_classes = [AllowAny] #this allows unauthenticated requests
def get(self, request):
ducks = Duck.objects.all()
...
...
...https://stackoverflow.com/questions/67782163
复制相似问题