def del_user(): name=request.args.get("username") if name in userinfo(): deluser(name) return redirect("/") else: return "用户名不存在"
def add_user(): name=request.args.get("username") password=request.args.get("password") if not checkinfo(name,password): return "用户和密码不存在" if name in userinfo(): return "用户名已存在" adduser(name,password) return redirect("/")
def index(): names=userinfo() print names return render_template("index.html",nameinfo=names)