Skip to content

Commit 2c4b75a

Browse files
authored
Update README.md
Fixed missing import needed for os.getenv.
1 parent d3578a5 commit 2c4b75a

File tree

1 file changed

+3
-1
lines changed
  • docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy

1 file changed

+3
-1
lines changed

docs/docs/06_sql_storage_sqlalchemy/04_configure_flask_sqlalchemy/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ def create_app():
5858
## Add Flask-SQLAlchemy code to the app factory
5959

6060
```python title="app.py"
61+
import os
62+
6163
from flask import Flask
6264
from flask_smorest import Api
6365

@@ -107,4 +109,4 @@ We've done three things:
107109

108110
:::tip How does SQLAlchemy know what tables to create?
109111
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.
110-
:::
112+
:::

0 commit comments

Comments
 (0)