示例#1
0
class ProductsSpecialsViewset(ModelViewSet):
    def __init__(self):
        super().__init__()
        self._searchImages = SearchImages()
        self._database = "PhotoExplorer"
        self._collection = "productSpecial"
    
    def listing(self, request):
        listingProduct = self._searchImages.FindMany(self._database, self._collection)
        return Response({"response": listingProduct}, status=status.HTTP_201_CREATED)
示例#2
0
class CategorieNameViewSet(ModelViewSet):
    def __init__(self):
        super().__init__()
        self._searchImages = SearchImages()
        self._databse = "PhotoExplorer"
        self._collection = "categorieName"

    def list(self, request):
        links = self._searchImages.FindMany(self._databse, self._collection)
        return Response({"response": links}, status=status.HTTP_201_CREATED)
示例#3
0
class SlideViewset(ModelViewSet):

    def __init__(self):
        super().__init__()
        self._searchImages = SearchImages()
        self._database = "PhotoExplorer"
        self._collection = "Slide"

    def list(self, request):
        links = self._searchImages.FindMany(self._database, self._collection)
        return Response({'response': links}, status = status.HTTP_200_OK)
示例#4
0
 def __init__(self):
     super().__init__()
     self._search = SearchImages()
     self._database = "PhotoExplorer"
     self._collection = "latestProduct"
示例#5
0
 def __init__(self):
     super().__init__()
     self._searchImages = SearchImages()
     self._database = "PhotoExplorer"
     self._collection = "productSpecial"
示例#6
0
 def __init__(self):
     super().__init__()
     self._searchImages = SearchImages()
     self._databse = "PhotoExplorer"
     self._collection = "categorieName"