from rest_framework import viewsets from apps.compliance.permissions import IsOpsOrAdmin from .models import ESGFieldReport from .serializers import ESGFieldReportSerializer class ESGFieldReportViewSet(viewsets.ModelViewSet): queryset = ESGFieldReport.objects.all() serializer_class = ESGFieldReportSerializer # The buyer portal reads ESG reports through the ORM # (apps/buyer/views.py::BatchDetailView), not this API, so the API needs no # buyer read and is closed to one. permission_classes = [IsOpsOrAdmin]