1 渲染模板
resp = make_response(redirect(url_for("website.routes.show_demo"))) expires_time = datetime.datetime.today() + datetime.timedelta(days=30) resp.set_cookie('consumer_key', consumer_key, expires=expires_time) return resp <div>{{request.cookies.get('consumer_id')}}</div>