Skip to content

Commit

Permalink
Merge pull request #158 from flyingearl/fix-missing-import
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
jslvtr authored May 23, 2024
2 parents 6fcf0cc + 2c4b75a commit ed92dab
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def create_app():
## Add Flask-SQLAlchemy code to the app factory

```python title="app.py"
import os

from flask import Flask
from flask_smorest import Api

Expand Down Expand Up @@ -108,4 +110,4 @@ We've done three things:

:::tip How does SQLAlchemy know what tables to create?
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 comments on commit ed92dab

Please sign in to comment.