1:会话: from flask import Flask, url_for, request, render_template, session from werkzeug.utils import redirect, escape app = Flask(__name__) @app.route('/') def index(): if 'username' in session: return 'Logged in as %s' % escape(session['username'])…