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
@@ -59,6 +59,8 @@ def create_app():
59
59
## Add Flask-SQLAlchemy code to the app factory
60
60
61
61
```python title="app.py"
62
+
import os
63
+
62
64
from flask import Flask
63
65
from flask_smorest import Api
64
66
@@ -108,4 +110,4 @@ We've done three things:
108
110
109
111
:::tip How does SQLAlchemy know what tables to create?
110
112
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