filter_fields = 'precio', 'ocompra__envio'
serializer_class = OCompraDetalleSerializer
queryset = OCompraDetalle.objects.all()
lookup_field = 'ocompra__folio'
Django REST Framework с фильтрацией набора запросов viewset-router