mirror of
https://github.com/lemeow125/Ivy-Backend.git
synced 2024-11-17 06:39:26 +08:00
10 lines
340 B
Python
10 lines
340 B
Python
from rest_framework.permissions import IsAuthenticated
|
|
from rest_framework import viewsets
|
|
from .serializers import ProductSerializer
|
|
from .models import Product
|
|
|
|
|
|
class ProductViewSet(viewsets.ModelViewSet):
|
|
permission_classes = [IsAuthenticated]
|
|
serializer_class = ProductSerializer
|
|
queryset = Product.objects.all()
|