Example #1
0
def index():
	# Render the control panel. This route does not require user authentication
	# so it must be safe!
	no_admins_exist = (len(get_admins(env)) == 0)
	return render_template('index.html',
		hostname=env['PRIMARY_HOSTNAME'],
		storage_root=env['STORAGE_ROOT'],
		no_admins_exist=no_admins_exist,
	)
Example #2
0
def index():
	# Render the control panel. This route does not require user authentication
	# so it must be safe!
	no_admins_exist = (len(get_admins(env)) == 0)
	return render_template('index.html',
		hostname=env['PRIMARY_HOSTNAME'],
		storage_root=env['STORAGE_ROOT'],
		no_admins_exist=no_admins_exist,
	)
Example #3
0
def index():
	# Render the control panel. This route does not require user authentication
	# so it must be safe!

	no_users_exist = (len(get_mail_users(env)) == 0)
	no_admins_exist = (len(get_admins(env)) == 0)

	import boto.s3
	backup_s3_hosts = [(r.name, r.endpoint) for r in boto.s3.regions()]

	return render_template('index.html',
		hostname=env['PRIMARY_HOSTNAME'],
		storage_root=env['STORAGE_ROOT'],
		no_users_exist=no_users_exist,
		no_admins_exist=no_admins_exist,
		backup_s3_hosts=backup_s3_hosts,
	)
Example #4
0
def index():
    # Render the control panel. This route does not require user authentication
    # so it must be safe!

    no_users_exist = (len(get_mail_users(env)) == 0)
    no_admins_exist = (len(get_admins(env)) == 0)

    import boto.s3
    backup_s3_hosts = [(r.name, r.endpoint) for r in boto.s3.regions()]

    return render_template(
        'index.html',
        hostname=env['PRIMARY_HOSTNAME'],
        storage_root=env['STORAGE_ROOT'],
        no_users_exist=no_users_exist,
        no_admins_exist=no_admins_exist,
        backup_s3_hosts=backup_s3_hosts,
    )
Example #5
0
def index():
    # Render the control panel. This route does not require user authentication
    # so it must be safe!

    no_users_exist = (len(get_mail_users(env)) == 0)
    no_admins_exist = (len(get_admins(env)) == 0)

    utils.fix_boto()  # must call prior to importing boto
    import boto.s3
    backup_s3_hosts = [(r.name, r.endpoint) for r in boto.s3.regions()]
    lsb = utils.shell("check_output", ["/usr/bin/lsb_release", "-d"])

    return render_template(
        'index.html',
        hostname=env['PRIMARY_HOSTNAME'],
        storage_root=env['STORAGE_ROOT'],
        no_users_exist=no_users_exist,
        no_admins_exist=no_admins_exist,
        backup_s3_hosts=backup_s3_hosts,
        csr_country_codes=csr_country_codes,
    )