def login():
form = LoginForm()
if form.validate_on_submit():
if form.username.data == 'Login' and form.password.data == 'Password':
flash('Вы вошли')
return redirect('/index')
else:
flash('Неверный логин или пароль')
return render_template('login.html', title='Sign In', form=form)