def login_required(f):
@wraps(f)
def decorated_function(*args, **kwargs):
if "logged_in" not in session or not session['logged_in'] \
or "key" not in session or current_session == None \
or not current_session.verify_password():
session.clear()
return redirect(url_for("login"))
return f(*args, **kwargs)
return decorated_function
评论列表
文章目录