Ivy-Backend/ivy/products/views.py

11 lines
298 B
Python
Raw Normal View History

2023-03-05 21:56:48 +08:00
from rest_framework.permissions import IsAuthenticated
from rest_framework import viewsets
from .serializers import ProductSerializer
from .models import Product
class ProductViewSet(viewsets.ModelViewSet):
2023-03-05 21:56:48 +08:00
serializer_class = ProductSerializer
queryset = Product.objects.all()