def post(self): # TODO 解决在首页登录框中无法获取 csrf_token 的问题 form = LoginForm(csrf_enabled=False) if form.validate_on_submit(): login_user(form.user) return redirect(url_for('home.index'))
def post(self): form = LoginForm() if form.validate_on_submit(): login_user(form.user) return redirect(url_for('home.index'))