@register.simple_tag
def filter_url(request, the_filter, the_value):
    getvars = request.GET.copy()
    getvars[the_filter] = the_value
    return "%s?%s" % (request.path, getvars.urlencode())
dataset/ETHPy150Open caseywstark/colab/colab/apps/issues/templatetags/issues_tags.py/filter_url/original