Ejemplo n.º 1
0
def breadbox_location_url(base_url, loc_up, query_string):
    from seo.helpers import urlencode_path_and_query_string
    # Remove the redirect flag from the query string if it's there since
    # it's no longer relevant
    query_string = query_string if query_string else None
    url = "%s%s?%s" % (base_url, loc_up, query_string.replace('&&', '&')) \
        if query_string else "%s%s" % (base_url, loc_up)
    return urlencode_path_and_query_string(smart_str(url))
Ejemplo n.º 2
0
def breadbox_url(base_url, query_string):
    from seo.helpers import urlencode_path_and_query_string
    # Remove the redirect flag from the query string if it's there since
    # it's no longer relevant
    query_string = query_string.replace("r=True", '') if query_string else None
    if base_url == '/' or not base_url:
        base_url = '/jobs/'

    url = ("%s?%s" % (base_url, query_string.replace("&&", "&"))
           if query_string else base_url)
    return urlencode_path_and_query_string(smart_str(url))