摘要:
装饰器,验证当前session中是否存在定义的user_id,没有就重定向到登录页 from flask import session, redirect, url_forfrom functools import wrapsimport configdef login_required(func) 阅读全文
摘要:
config form from wtforms import Form, StringField, IntegerFieldfrom wtforms.validators import Email, InputRequired, Lengthclass LoginForm(Form): email 阅读全文
摘要:
html <!DOCTYPE html><html lang="zh-CN"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" cont 阅读全文