def get_hostname(request):
    """
    Create URI with scheme and hostname
    """
    if request.is_secure():
        return 'https://' + request.META.get('HTTP_HOST', '')
    else:
        return 'http://' + request.META.get('HTTP_HOST', '')