Ejemplo 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)
Ejemplo 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)
Ejemplo n.º 3
0
    def get_packages(self, project):
        packages = project.discoveredpackages.all()

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