| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7c5894e commit 56f4390
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -84,7 +84,7 @@ In this case, we used `response_model=TeamRead` and `response_model=HeroRead`, s | |||
| 84 | 84 | ||
| 85 | 85 | # Code here omitted 👈 | |
| 86 | 86 | ||
| 87 | - {!./docs_src/tutorial/fastapi/teams/tutorial001.py[ln:159-164]!} | ||
| 87 | + {!./docs_src/tutorial/fastapi/teams/tutorial001.py[ln:158-163]!} | ||
| 88 | 88 | ||
| 89 | 89 | # Code below omitted 👇 | |
| 90 | 90 | ``` | |
@@ -234,7 +234,7 @@ In the case of the hero, this tells FastAPI to extract the `team` too. And in th | |||
| 234 | 234 | ||
| 235 | 235 | # Code here omitted 👈 | |
| 236 | 236 | ||
| 237 | - {!./docs_src/tutorial/fastapi/relationships/tutorial001.py[ln:168-173]!} | ||
| 237 | + {!./docs_src/tutorial/fastapi/relationships/tutorial001.py[ln:167-172]!} | ||
| 238 | 238 | ||
| 239 | 239 | # Code below omitted 👇 | |
| 240 | 240 | ``` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -177,7 +177,7 @@ And then we remove the previous `with` block with the old **session**. | |||
| 177 | 177 | ||
| 178 | 178 | # Code here omitted 👈 | |
| 179 | 179 | ||
| 180 | - {!./docs_src/tutorial/fastapi/session_with_dependency/tutorial001.py[ln:55-107]!} | ||
| 180 | + {!./docs_src/tutorial/fastapi/session_with_dependency/tutorial001.py[ln:55-106]!} | ||
| 181 | 181 | ``` | |
| 182 | 182 | ||
| 183 | 183 | <details> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -92,7 +92,7 @@ These are equivalent and very similar to the **path operations** for the **heroe | |||
| 92 | 92 | ```Python hl_lines="3-9 12-20 23-28 31-47 50-57" | |
| 93 | 93 | # Code above omitted 👆 | |
| 94 | 94 | ||
| 95 | - {!./docs_src/tutorial/fastapi/teams/tutorial001.py[ln:139-193]!} | ||
| 95 | + {!./docs_src/tutorial/fastapi/teams/tutorial001.py[ln:138-192]!} | ||
| 96 | 96 | ||
| 97 | 97 | # Code below omitted 👇 | |
| 98 | 98 | ``` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -98,7 +98,6 @@ def update_hero( | |||
| 98 | 98 | ||
| 99 | 99 | @app.delete("/heroes/{hero_id}") | |
| 100 | 100 | def delete_hero(*, session: Session = Depends(get_session), hero_id: int): | |
| 101 | - | ||
| 102 | 101 | hero = session.get(Hero, hero_id) | |
| 103 | 102 | if not hero: | |
| 104 | 103 | raise HTTPException(status_code=404, detail="Hero not found") | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -136,7 +136,6 @@ def update_hero( | |||
| 136 | 136 | ||
| 137 | 137 | @app.delete("/heroes/{hero_id}") | |
| 138 | 138 | def delete_hero(*, session: Session = Depends(get_session), hero_id: int): | |
| 139 | - | ||
| 140 | 139 | hero = session.get(Hero, hero_id) | |
| 141 | 140 | if not hero: | |
| 142 | 141 | raise HTTPException(status_code=404, detail="Hero not found") | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -98,7 +98,6 @@ def update_hero( | |||
| 98 | 98 | ||
| 99 | 99 | @app.delete("/heroes/{hero_id}") | |
| 100 | 100 | def delete_hero(*, session: Session = Depends(get_session), hero_id: int): | |
| 101 | - | ||
| 102 | 101 | hero = session.get(Hero, hero_id) | |
| 103 | 102 | if not hero: | |
| 104 | 103 | raise HTTPException(status_code=404, detail="Hero not found") | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -127,7 +127,6 @@ def update_hero( | |||
| 127 | 127 | ||
| 128 | 128 | @app.delete("/heroes/{hero_id}") | |
| 129 | 129 | def delete_hero(*, session: Session = Depends(get_session), hero_id: int): | |
| 130 | - | ||
| 131 | 130 | hero = session.get(Hero, hero_id) | |
| 132 | 131 | if not hero: | |
| 133 | 132 | raise HTTPException(status_code=404, detail="Hero not found") | |
| Back | FazBrowse Home | New Git URL |
0 commit comments