摘要:
1.中间件 # coding=utf-8 from flask import Flask app = Flask(__name__) app.config.from_object("settings.DevelopmentConfig") @app.route("/index", methods=[ 阅读全文
摘要:
1.闪现 # coding=utf-8 from flask import Flask, session, flash, get_flashed_messages app = Flask(__name__) app.config.from_object("settings.DevelopmentCo 阅读全文
摘要:
1.main.py # coding=utf-8 from flask import Flask, session app = Flask(__name__) # 请求执行之前 # before_request = [xxx, xxx1] @app.before_request def xxx(): 阅读全文
摘要:
1.简单使用 from flask import Flask, session app = Flask(__name__) app.secret_key = "adfas" app.__call__() @app.route("/index", methods=["POST", "GET"]) de 阅读全文
摘要:
1.main.py # coding=utf-8 from flask import Flask, render_template, Markup app = Flask(__name__) # 加上这个装饰器只有每个模板中都可以直接使用这个函数 {{ sb(1,2)}} @app.template 阅读全文
摘要:
1.请求 # coding=utf-8 import json from flask import Flask, redirect, render_template, request, jsonify, make_response app = Flask(__name__) @app.route(" 阅读全文
摘要:
##1.试图 # coding=utf-8 from flask import Flask, views from functools import wraps app = Flask(__name__) app.config.from_object("settings.DevelopmentCon 阅读全文
摘要:
1 from flask import Flask app = Flask(__name__) app.config.from_object("settings.DevelopmentConfig") @app.route("/index", methods=["POST", "GET"]) def 阅读全文
摘要:
1.简单配置倒入 # coding=utf-8 from flask import Flask app = Flask(__name__) # app.config.from_object("settings.DevelopmentConfig") @app.route("/index", meth 阅读全文
摘要:
1.简单flaskweb # coding=utf-8 from flask import Flask, render_template, request, redirect, session app = Flask(__name__, template_folder="templates") ap 阅读全文