Skip to content

Commit 4231898

Browse files
Update multiple-models.md
1 parent b1a2173 commit 4231898

File tree

1 file changed

+3
-61
lines changed

1 file changed

+3
-61
lines changed

docs/tutorial/fastapi/multiple-models.md

Lines changed: 3 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ And those inherited fields will also be in the **autocompletion** and **inline e
260260

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

263-
{* ./docs_src/tutorial/fastapi/multiple_models/tutorial002_py310.py ln[5-12] hl[4,6,9] *}
263+
{* ./docs_src/tutorial/fastapi/multiple_models/tutorial002_py310.py ln[5:12] hl[4,6,9] *}
264264

265265
////
266266

@@ -278,67 +278,12 @@ Now let's see the `HeroCreate` model that will be used to define the data that w
278278

279279
This is a fun one:
280280

281-
//// tab | Python 3.10+
281+
{* ./docs_src/tutorial/fastapi/multiple_models/tutorial002_py310.py ln[5:16] hl[13:14] *}
282282

283-
```Python hl_lines="13-14"
284-
# Code above omitted 👆
285-
286-
{!./docs_src/tutorial/fastapi/multiple_models/tutorial002_py310.py[ln:5-16]!}
287-
288-
# Code below omitted 👇
289-
```
290-
291-
////
292-
293-
//// tab | Python 3.9+
294-
295-
```Python hl_lines="13-14"
296-
# Code above omitted 👆
297-
298-
{!./docs_src/tutorial/fastapi/multiple_models/tutorial002_py39.py[ln:7-18]!}
299-
300-
# Code below omitted 👇
301-
```
302-
303-
////
304-
305-
//// tab | Python 3.7+
306-
307-
```Python hl_lines="13-14"
308-
# Code above omitted 👆
309-
310-
{!./docs_src/tutorial/fastapi/multiple_models/tutorial002.py[ln:7-18]!}
311-
312-
# Code below omitted 👇
313-
```
314-
315-
////
316283

317284
/// details | 👀 Full file preview
318285

319-
//// tab | Python 3.10+
320-
321-
```Python
322-
{!./docs_src/tutorial/fastapi/multiple_models/tutorial002_py310.py!}
323-
```
324-
325-
////
326-
327-
//// tab | Python 3.9+
328-
329-
```Python
330-
{!./docs_src/tutorial/fastapi/multiple_models/tutorial002_py39.py!}
331-
```
332-
333-
////
334-
335-
//// tab | Python 3.7+
336-
337-
```Python
338-
{!./docs_src/tutorial/fastapi/multiple_models/tutorial002.py!}
339-
```
340-
341-
////
286+
{* ./docs_src/tutorial/fastapi/multiple_models/tutorial002_py310.py *}
342287

343288
///
344289

@@ -362,9 +307,6 @@ This one just declares that the `id` field is required when reading a hero from
362307

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

365-
366-
{!./docs_src/tutorial/fastapi/multiple_models/tutorial002_py39.py[ln:7-22]!}
367-
368310
/// details | 👀 Full file preview
369311

370312
{* ./docs_src/tutorial/fastapi/multiple_models/tutorial002_py310.py *}

0 commit comments

Comments
 (0)