Skip to content

Commit ed92dab

Browse files
authored
Merge pull request #158 from flyingearl/fix-missing-import
Update README.md
2 parents 6fcf0cc + 2c4b75a commit ed92dab

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
@@ -59,6 +59,8 @@ def create_app():
5959
## Add Flask-SQLAlchemy code to the app factory
6060

6161
```python title="app.py"
62+
import os
63+
6264
from flask import Flask
6365
from flask_smorest import Api
6466

@@ -108,4 +110,4 @@ We've done three things:
108110

109111
:::tip How does SQLAlchemy know what tables to create?
110112
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.
111-
:::
113+
:::

0 commit comments

Comments
 (0)