1# generics.py
2class GenericAPIView(APIView):
3 ...
4 def dispatch(self, request, *args, **kwargs):
5 lookup_param = request.GET.get(self.lookup_field, None)
6 if lookup_param:
7 kwargs[lookup_field] = lookup_param
8 return Super(GenericAPIView, self).dispatch(request, *args, **kwargs)
9 ...
10