I have a model with a ManyToManyField. So, I have a endpoint to retrieve
the list of this ManyToManyField. But I want filter the queryset with the
GET parametters (CF: FilterClass). But What is the best practice to do that
I have already a FilterClass for this model and it's 2 different models
def get_parts(self, request, set__idSet=None):
my_set = self.get_object()
queryset = my_set.mySetParts.all() # I want filter this queryset
page = self.paginate_queryset(queryset)
if page is not None:
serializer = self.get_serializer(page, many=True)
serializer = self.get_serializer(queryset, many=True)
You received this message because you are subscribed to the Google Groups
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.