Skip to content

Commit 2379d11

Browse files
Update multiple-models.md
1 parent 608d7d5 commit 2379d11

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

docs/tutorial/fastapi/multiple-models.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,6 @@ In versions of **SQLModel** before `0.0.14` you would use the method `.from_orm(
165165

166166
We can now create a new `Hero` instance (the one for the database) and put it in the variable `db_hero` from the data in the `hero` variable that is the `HeroCreate` instance we received from the request.
167167

168-
///
169-
170168
{* ./docs_src/tutorial/fastapi/multiple_models/tutorial001_py310.py ln[47] hl[3] *}
171169

172170
////
@@ -252,7 +250,7 @@ But now we can create the **other models inheriting from it**, they will all sha
252250

253251
Let's start with the only **table model**, the `Hero`:
254252

255-
///
253+
////
256254

257255
{* ./docs_src/tutorial/fastapi/multiple_models/tutorial002_py310.py ln[5:12] hl[9:10] *}
258256

@@ -276,8 +274,6 @@ And those inherited fields will also be in the **autocompletion** and **inline e
276274

277275
Notice that the parent model `HeroBase` is not a **table model**, but still, we can declare `name` and `age` using `Field(index=True)`.
278276

279-
///
280-
281277
{* ./docs_src/tutorial/fastapi/multiple_models/tutorial002_py310.py ln[5:12] hl[4,6,9] *}
282278

283279
////
@@ -295,11 +291,10 @@ But once the child model `Hero` (the actual **table model**) inherits those fiel
295291
Now let's see the `HeroCreate` model that will be used to define the data that we want to receive in the API when creating a new hero.
296292

297293
This is a fun one:
298-
///
299294

300295
{* ./docs_src/tutorial/fastapi/multiple_models/tutorial002_py310.py ln[5:16] hl[13:14] *}
301296

302-
///
297+
////
303298

304299
/// details | 👀 Full file preview
305300

@@ -328,7 +323,7 @@ This one just declares that the `id` field is required when reading a hero from
328323

329324
{* ./docs_src/tutorial/fastapi/multiple_models/tutorial002_py310.py ln[5:20] hl[17:18] *}
330325

331-
///
326+
////
332327

333328
/// details | 👀 Full file preview
334329

0 commit comments

Comments
 (0)