def login(): form = LoginForm() if form.validate_on_submit(): if form.email.data == '*****@*****.**': flash(f'Logged in succesfully', 'success') return redirect(url_for('index')) return render_template('login.html', title='LOGIN', form=form)
def login(): form = LoginForm() if form.validate_on_submit(): user = User.query.filter_by(email=form.email.data).first() if user and user.password == form.password.data: login_user(user) return redirect(url_for('index')) else: flash(f'Login Unseccsful', 'danger') return render_template('login.html', title='LOGIN', form=form)
def login(): form = LoginForm() if form.email.data == '*****@*****.**': flash(f' Giriş uğurlu oldu', 'success') return redirect(url_for('index')) return render_template('login.html', title='LOGIN', form=form)
def login(): form = LoginForm() return render_template('login.html', title='LOGIN', form=form)