We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a515fa5 + 00441f3 commit 85dd170Copy full SHA for 85dd170
2 files changed
examples/bootstrap4/app.py
@@ -137,8 +137,7 @@ class Message(db.Model):
137
create_time = db.Column(db.Integer, nullable=False, unique=True)
138
139
140
-@app.before_first_request
141
-def before_first_request_func():
+with app.app_context():
142
db.drop_all()
143
db.create_all()
144
for i in range(20):
examples/bootstrap5/app.py
@@ -141,8 +141,7 @@ class Message(db.Model):
145
146
147
148
0 commit comments