code: def url_replace(context, field, value):
      
  
      query_string = context['request'].GET.copy()
      query_string[field] = value
  
      return query_string.urlencode()
docs: To avoid GET params losing
  
      :param context: context_obj
      :param field: str
      :param value: str
      :return: dict-like object