摘要:
# 统一路由蓝牙规划 # file:blueprint_route.py from flask import Blueprint route_test = Blueprint("home",__name__) # 路由只有通过app注册后才生效 """ 统一路由规划的优点: 统一前缀 当网站结构复杂后可维护 """ @route_test.route("/") def home(): ... 阅读全文
摘要:
# 框架环境 安装 Flask_SQLALchemy,mysqlclient from flask import Flask from flask_sqlalchemy import SQLALchemy # 导入数据库模块 app = Flask(__name__) app.config["SQLALCHEMY_DATABASE_URI"] = 'mysql://root:12345... 阅读全文