def get(self, request, country, city, format=None): print(country) print(city) products = Product.objects.filter( country__name__contains=country).filter(city__name__contains=city) serializer = ProductListSerializer(products, many=True) return Response(serializer.data)
def get(self, request, format=None): products = Product.objects.filter(category__contains='여행편의')[:6] serializer = ProductListSerializer(products, many=True) return Response(serializer.data)
def get(self, request, format=None): products = Product.objects.all() serializer = ProductListSerializer(products, many=True) return Response(serializer.data)