1👍
It would be more flexible if you used request.GET.get()
to get the query parameters that you are looking for:
offset = request.GET.get('offset', None)
limit = request.GET.get('limit', None)
or get all the params as a dict:
request.GET.dict()
{'offset':'0', 'limit':'25'}
Source:stackexchange.com