@register.simple_tag
def add_query_param(request, key, val):
 iri = request.get_full_path()
 uri = iri_to_uri(iri)
 return escape(replace_query_param(uri, key, val))

@ register . simple_tag def add_query_param ( request , key , val ) : iri = request . get_full_path ( ) uri = iri_to_uri ( iri ) return escape ( replace_query_param ( uri , key , val ) )
add a query parameter to the current request url .