order by for products
This commit is contained in:
@@ -219,6 +219,7 @@ class AllProductsView(APIView):
|
||||
products = products.order_by('name')
|
||||
|
||||
# Pagination
|
||||
products.order_by('category')
|
||||
paginator = self.pagination_class()
|
||||
paginated_products = paginator.paginate_queryset(products, request)
|
||||
serializer = self.serializer_class(
|
||||
|
||||
Reference in New Issue
Block a user