Exemplo n.º 1
1
def createaccount():
    form = AccountForm.RegisterForm()
    formLogin = AccountForm.LoginForm()
    if request.method =='GET':
        return render_template('createaccount.html',form=form,formLogin=formLogin)
    if request.method =='POST':
        if request.form.get('login', None)  == 'Login' :
            return AccountController.authenticatePopUpLogin(formLogin,'index')
        return AccountController.createuser(form=form, formLogin=formLogin)
Exemplo n.º 2
0
def index():
    formLogin = AccountForm.LoginForm()
    if request.method == "GET":
        return render_template("index.html", formLogin=formLogin)
    if request.method == "POST":
        if request.form.get("login", None) == "Login":
            return AccountController.authenticatePopUpLogin(formLogin, "index")
Exemplo n.º 3
0
def index():
    formLogin = AccountForm.LoginForm()
    if request.method == 'GET' :
        return render_template('index.html',formLogin=formLogin)
    if request.method == 'POST' :
        if request.form.get('login', None)  == 'Login' :
            return AccountController.authenticatePopUpLogin(formLogin,'index')
Exemplo n.º 4
0
def checkout():
    """ To address user pop up login , we have to pass formLogin to each page """
    formLogin = AccountForm.LoginForm()
    if request.method == "GET":
        return render_template("checkout.html", formLogin=formLogin)
    if request.method == "POST":
        if request.form.get("login", None) == "Login":
            return AccountController.authenticatePopUpLogin(formLogin, "checkout")
Exemplo n.º 5
0
def checkout():
    """ To address user pop up login , we have to pass formLogin to each page """
    formLogin = AccountForm.LoginForm()
    if request.method == 'GET' :
        return render_template('checkout.html',formLogin=formLogin)
    if request.method == 'POST' :
        if request.form.get('login', None)  == 'Login' :
            return AccountController.authenticatePopUpLogin(formLogin,'checkout')
Exemplo n.º 6
0
def createaccount():
    form = AccountForm.RegisterForm()
    formLogin = AccountForm.LoginForm()
    if request.method == "GET":
        return render_template("createaccount.html", form=form, formLogin=formLogin)
    if request.method == "POST":
        if request.form.get("login", None) == "Login":
            return AccountController.authenticatePopUpLogin(formLogin, "index")
        return AccountController.createuser(form=form, formLogin=formLogin)