[Answer]-Django capturing query parameters

1👍

You probably don’t want to catch them in the urlconf. Catch query params right in your view code.

def myview(request):
    if 'mygetvar' in request.GET:
        myobjects = MyObjects.objects.filter(somefield=request.GET.get('mygetvar', 'defaultvalue'))
        # do something useful

Docs

Leave a comment