我有
class ProductSearch(ListAPIView):
queryset = Product.objects.all()
permission_classes = [AllowAny]
serializer_class = ProductSearchSerializer
filter_backends = [SearchFilter]
filter_fields = ['meta_data', 'store__district__id']
但是当我通过API进行搜索时,我需要输入
"store__district__id": "blabla"
但实际上我只想要
"district_id": "x"
有人可以帮忙吗?