Exemplo n.º 1
0
def BaseHomePage():
    if request.method == "GET":
        return render_template("Homepage.html",
                               out_of_date=AppManager.check_software_version(),
                               version_number=AppManager.get_software_verision_number())
    elif request.method == "POST":
        return jsonify(AppManager.get_all_user_campaigns(current_user.user_email))
Exemplo n.º 2
0
def login():
    if request.method == "POST":
        if 'email' in request.form and 'password' in request.form and request.form['email'] is not None and request.form['password'] is not None:
            user_object = UsrMgmt.user_login(request.form['email'], request.form['password'])
            if user_object is False:
                return redirect(url_for("BaseHomePage", error="Incorrect Username/Password"))

            if user_object.first_logon == 1:
                login_user(user_object)
                return redirect(url_for("BaseHomePage"))

            else:
                guid = UsrMgmt.get_first_logon_guid(request.form['email'])
                # return render_template("auth/PasswordResetPage.html",guid=guid)
                return redirect(url_for("PasswordReset", guid=guid))
    return render_template("auth/LoginPage.html",
                           fudge_version=AppManager.get_software_verision_number(),
                           fudge_version_name=AppManager.get_software_verision_name())
Exemplo n.º 3
0
def BaseHomePage():
    return render_template("Homepage.html",
                           out_of_date=AppManager.check_software_version(),
                           version_number=AppManager.get_software_verision_number())