from rest_framework import generics, mixins
from store.models import Product
from .serializers import ProductListSerializers

class ProductListAPIView(mixins.CreateModelMixin, generics.ListAPIView):
    serializer_class = ProductListSerializers

    def get_queryset(self):
        return Product.objects.all()
    
    def post(self, request, *args, **kwargs):
        return self.create( request, *args, **kwargs)
    
    
class ProductAPIRUDView(generics.RetrieveDestroyAPIView):
    lookup_field = 'slug'
    serializer_class = ProductListSerializers

    def get_queryset(self):
        return Product.objects.all()
    
    
    def patch(self, request, *args, **kwargs):
        return self.update( request, *args, **kwargs)
    


97d39e13ae8d355e217b890f4056d2e2d7a7b29d
<mask token>


class ProductAPIRUDView(generics.RetrieveDestroyAPIView):
    <mask token>
    <mask token>

    def get_queryset(self):
        return Product.objects.all()

    def patch(self, request, *args, **kwargs):
        return self.update(request, *args, **kwargs)

<mask token>


class ProductListAPIView(mixins.CreateModelMixin, generics.ListAPIView):
    <mask token>
    <mask token>
    <mask token>


class ProductAPIRUDView(generics.RetrieveDestroyAPIView):
    lookup_field = 'slug'
    serializer_class = ProductListSerializers

    def get_queryset(self):
        return Product.objects.all()

    def patch(self, request, *args, **kwargs):
        return self.update(request, *args, **kwargs)

<mask token>


class ProductListAPIView(mixins.CreateModelMixin, generics.ListAPIView):
    <mask token>

    def get_queryset(self):
        return Product.objects.all()
    <mask token>


class ProductAPIRUDView(generics.RetrieveDestroyAPIView):
    lookup_field = 'slug'
    serializer_class = ProductListSerializers

    def get_queryset(self):
        return Product.objects.all()

    def patch(self, request, *args, **kwargs):
        return self.update(request, *args, **kwargs)

<mask token>


class ProductListAPIView(mixins.CreateModelMixin, generics.ListAPIView):
    <mask token>

    def get_queryset(self):
        return Product.objects.all()

    def post(self, request, *args, **kwargs):
        return self.create(request, *args, **kwargs)


class ProductAPIRUDView(generics.RetrieveDestroyAPIView):
    lookup_field = 'slug'
    serializer_class = ProductListSerializers

    def get_queryset(self):
        return Product.objects.all()

    def patch(self, request, *args, **kwargs):
        return self.update(request, *args, **kwargs)

from rest_framework import generics, mixins
from store.models import Product
from .serializers import ProductListSerializers

class ProductListAPIView(mixins.CreateModelMixin, generics.ListAPIView):
    serializer_class = ProductListSerializers

    def get_queryset(self):
        return Product.objects.all()
    
    def post(self, request, *args, **kwargs):
        return self.create( request, *args, **kwargs)
    
    
class ProductAPIRUDView(generics.RetrieveDestroyAPIView):
    lookup_field = 'slug'
    serializer_class = ProductListSerializers

    def get_queryset(self):
        return Product.objects.all()
    
    
    def patch(self, request, *args, **kwargs):
        return self.update( request, *args, **kwargs)
    

