Checklist
Steps to reproduce
Write a functional view and apply DjangoModelPermissions permissions
@api_view(['GET', 'POST', 'DELETE'])
@permission_classes((DjangoModelPermissions,))
def test(request):
if request.method == 'GET':
Expected behavior
Forbidden: /api/test
[12/Dec/2020 22:04:02] "GET /api/test HTTP/1.1" 403 63
Actual behavior
AssertionError: Cannot apply DjangoModelPermissions on a view that does not set .queryset or have a .get_queryset() method.