How can i access QueryString values in Serializer Django Rest Framework
According to the docs you want to use self.request.QUERY_PARAMS
You can see it being used here
UPDATE:
As of DRF 3.0:
The usage of request.QUERY_PARAMS is now pending deprecation in favor of the lowercased request.query_params
When using ViewSets, you can access the request in the serializer context (like you access the view). You can access the query params from this
def get_alternate_name(self, obj):
request = self.context['request']
print request.query_params['q']
return 'foo'
The attribute view.kwargs contains the named arguments parsed from your url-config, so from the path-part.