コード例 #1
0
ファイル: __init__.py プロジェクト: ehchua/oasisqe
def index():
    """ Main landing page. Welcome them and give them some login instructions.
    """
    if 'user_id' in session:
        return redirect(url_for("main_top"))

    if OaConfig.default == "landing":
        mesg_login = DB.get_message("loginmotd")
        alt_landing = os.path.join(OaConfig.theme_path, "landing_page.html")
        if os.path.isfile(alt_landing):
            tmpf = open(alt_landing)
            tmpl = tmpf.read()
            tmpf.close()
            return render_template_string(tmpl, mesg_login=mesg_login)
        return render_template("landing_page.html", mesg_login=mesg_login)
    if OaConfig.default == "locallogin":
        return redirect(url_for("login_local"))
    if OaConfig.default == "webauth":
        return redirect(url_for("login_webauth_submit"))
    return render_template("landing_page.html")
コード例 #2
0
ファイル: __init__.py プロジェクト: tkanesh/oasisqe
def index():
    """ Main landing page. Welcome them and give them some login instructions.
    """
    if 'user_id' in session:
        return redirect(url_for("main_top"))

    if OaConfig.default == "landing":
        mesg_login = DB.get_message("loginmotd")
        alt_landing = os.path.join(OaConfig.theme_path, "landing_page.html")
        if os.path.isfile(alt_landing):
            tmpf = open(alt_landing)
            tmpl = tmpf.read()
            tmpf.close()
            return render_template_string(tmpl, mesg_login=mesg_login)
        return render_template("landing_page.html", mesg_login=mesg_login)
    if OaConfig.default == "locallogin":
        return redirect(url_for("login_local"))
    if OaConfig.default == "webauth":
        return redirect(url_for("login_webauth_submit"))
    return render_template("landing_page.html")
コード例 #3
0
ファイル: __init__.py プロジェクト: ehchua/oasisqe
def login_local():
    """ Present a login page for people with local OASIS accounts to log in"""

    mesg_login = DB.get_message("loginmotd")
    return render_template("login_screen_local.html", mesg_login=mesg_login)
コード例 #4
0
ファイル: __init__.py プロジェクト: tkanesh/oasisqe
def login_local():
    """ Present a login page for people with local OASIS accounts to log in"""

    mesg_login = DB.get_message("loginmotd")
    return render_template("login_screen_local.html", mesg_login=mesg_login)