def make_full_url(request, url):
    """Get a relative URL and returns the absolute version.
    Eg: “/foo/bar?q=is-open” ==> “http://example.com/foo/bar?q=is-open”
    """
    urlparts = request.urlparts
    return '{scheme}://{site}/{url}'.format(
        scheme=urlparts.scheme,
        site=get_site_name(request),
        url=url.lstrip('/'),
    )
Get a relative URL and returns the absolute version.
    Eg: “/foo/bar?q=is-open” ==> “http://example.com/foo/bar?q=is-open”