update
This commit is contained in:
@@ -10,7 +10,7 @@ from rest_framework.permissions import IsAuthenticatedOrReadOnly
|
||||
from utils.pagination import StructurePagination
|
||||
from drf_spectacular.utils import extend_schema, OpenApiParameter
|
||||
from drf_spectacular.types import OpenApiTypes
|
||||
from rest_framework.permission_classes import AllowAny
|
||||
from rest_framework.permissions import AllowAny
|
||||
|
||||
class AllCategories(APIView):
|
||||
serializer_class = CategorySerializer
|
||||
@@ -21,7 +21,7 @@ class AllCategories(APIView):
|
||||
|
||||
class ProductView(APIView):
|
||||
serializer_class = ProductSerializer
|
||||
permission_classes = AllowAny
|
||||
permission_classes = [AllowAny]
|
||||
def get(self, request, pk):
|
||||
product = get_object_or_404(ProductModel, id=pk)
|
||||
product_ser = self.serializer_class(instance=product, many=False)
|
||||
|
||||
Reference in New Issue
Block a user