rest-apis-flask-python
rest-apis-flask-python copied to clipboard
Remove db creation from app.py file in favor of migrations
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| rest-apis-flask-python | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Feb 8, 2024 8:00am |
Thanks @LUS24! I think there might be a few more places to remove the code, some lectures in section 12 still have the obsolete code 🤔
Thanks @LUS24! I think there might be a few more places to remove the code, some lectures in section 12 still have the obsolete code 🤔
I didn't find any references beyond section 9:
...
...
docs\docs\08_flask_jwt_extended\12_token_refreshing_flask_jwt_extended\start\conftest.py:
24 def jwt(app):
25: with app.app_context():
26:
26 access_token = create_access_token(identity=1)
31 def admin_jwt(app):
32: with app.app_context():
33:
33 access_token = create_access_token(
docs\docs\09_flask_migrate\02_add_flask_migrate_to_app\README.md:
35
36: with app.app_context():
37:
37 db.create_all()
44 ```py
45: with app.app_context():
46:
46 db.create_all()
docs\docs\09_flask_migrate\02_add_flask_migrate_to_app\start\app.py:
94
95: with app.app_context():
96: import models # noqa: F401
97
That last appearance is the one that instructs students to remove it in favor of the migrations.
Have you seen that code in some other file that I've missed?