def query_update(context, field, value=''):
    """
    Replaces the given HTTP GET query paramter with the provided value.
    """
    params = context['request'].GET.copy()
    params[field] = value
    return params.urlencode()