def register(): form = UserForm(request.POST) if request.method == 'POST' and form.validate(): user = UserModel() user.name = form.name.data user.email = form.email.data user.save() redirect('register') return template("user/register.html", form=form)
def login(): message = None form = LoginForm(request.POST) if request.method == 'POST' and form.validate(): email = form.email.data password = form.password.data if email == password: redirect('/') else: message = 'Login failed !' return template("login.html", form=form, message=message)
def index_logado(): #view = template.get_template("home.html") #return view.render() return template("home.html")