@register.simple_tag
def dict_as_query_string(dict, prefix=""):
    return "&".join(["%s%s=%s" % (prefix, key, value) for key, value in dict.items()])
Convert a dictionary to a query string, minus the initial ?
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/hqwebapp/templatetags/hq_shared_tags.py/dict_as_query_string