fix: optimize insert
This commit is contained in:
6
app.py
6
app.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user