Return the domain:port part of the URL without scheme.
    Eg: facebook.com, 127.0.0.1:8080, etc.

def get_site_name(request):
    """Return the domain:port part of the URL without scheme.
    Eg: facebook.com, 127.0.0.1:8080, etc.
    """
    urlparts = request.urlparts
    return ':'.join([urlparts.hostname, str(urlparts.port)])