how to use query_params in get_object djangorestframework
# generics.py
class GenericAPIView(APIView):
...
def dispatch(self, request, *args, **kwargs):
lookup_param = request.GET.get(self.lookup_field, None)
if lookup_param:
kwargs[lookup_field] = lookup_param
return Super(GenericAPIView, self).dispatch(request, *args, **kwargs)
...