def activate(token): print(Users.check_active_token(token)) if Users.check_active_token(token): flash("激活成功,请登陆", "ok") return redirect(url_for("user.login")) else: flash("激活失败") return redirect(url_for("main.index"))
def activate(token): if Users.check_active_token(token): flash('该账户已经激活') return redirect(url_for('users.login')) else: flash('账户激活失败') return redirect(url_for('main.index'))