摘要:
第一步:下载模块 pip install Flask-Migrate --upgrade __init__文件配置 from flask_migrate import Migrate app = Flask(__name__) app.config.from_pyfile('./settings.p 阅读全文
摘要:
flask-sqlalchemy集成到flask中 1 下载模块 pip install flask-sqlalchemy --upgrade 2 __init__文件中导入模块 from flask import Flask from flask_sqlalchemy import SQLAlch 阅读全文
摘要:
连接数据库准备 from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session from models import User 阅读全文