fix: optimize insert

This commit is contained in:
Zhaolong
2022-01-27 22:54:19 +08:00
parent c374acc1db
commit 82acef5765
2 changed files with 29 additions and 16 deletions

6
app.py
View File

@@ -8,9 +8,9 @@ from model import Person, SexEnum, City
app = Flask(__name__)
config.init_config(app)
db.init_app(app)
# with app.app_context():
# print(db.session.query(City).one())
db.app = app
with app.app_context():
db.create_all()
@app.route('/')
def hello_world(): # put application's code here