You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy/README.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,8 @@ def create_app():
58
58
## Add Flask-SQLAlchemy code to the app factory
59
59
60
60
```python title="app.py"
61
+
import os
62
+
61
63
from flask import Flask
62
64
from flask_smorest import Api
63
65
@@ -107,4 +109,4 @@ We've done three things:
107
109
108
110
:::tip How does SQLAlchemy know what tables to create?
109
111
The line `import models` lets SQLAlchemy know what models exist in our application. Because they are `db.Model` instances, SQLAlchemy will look at their `__tablename__` and defined `db.Column` attributes to create the tables.
0 commit comments