Exemplo n.º 1
0
    def get_packages(self, project):
        from scanpipe.api.serializers import DiscoveredPackageSerializer

        packages = project.discoveredpackages.all()

        for obj in packages.iterator():
            yield self.encode(DiscoveredPackageSerializer(obj).data)
Exemplo n.º 2
0
    def packages(self, request, *args, **kwargs):
        project = self.get_object()
        queryset = DiscoveredPackage.objects.project(project)

        paginated_qs = self.paginate_queryset(queryset)
        serializer = DiscoveredPackageSerializer(paginated_qs, many=True)

        return Response(serializer.data)
Exemplo n.º 3
0
    def get_packages(self, project):
        packages = project.discoveredpackages.all()

        for obj in packages.iterator():
            yield self.encode(DiscoveredPackageSerializer(obj).data)