예제 #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"