Browse Source

Remove code examples for Python 3.8 in `sub_applications`

pull/14510/head
Yurii Motov 7 months ago
parent
commit
5b4a8ab7b9
  1. 6
      docs/en/docs/advanced/sub-applications.md
  2. 0
      docs_src/sub_applications/tutorial001_py39.py
  3. 2
      tests/test_tutorial/test_sub_applications/test_tutorial001.py

6
docs/en/docs/advanced/sub-applications.md

@ -10,7 +10,7 @@ If you need to have two independent FastAPI applications, with their own indepen
First, create the main, top-level, **FastAPI** application, and its *path operations*:
{* ../../docs_src/sub_applications/tutorial001.py hl[3, 6:8] *}
{* ../../docs_src/sub_applications/tutorial001_py39.py hl[3, 6:8] *}
### Sub-application { #sub-application }
@ -18,7 +18,7 @@ Then, create your sub-application, and its *path operations*.
This sub-application is just another standard FastAPI application, but this is the one that will be "mounted":
{* ../../docs_src/sub_applications/tutorial001.py hl[11, 14:16] *}
{* ../../docs_src/sub_applications/tutorial001_py39.py hl[11, 14:16] *}
### Mount the sub-application { #mount-the-sub-application }
@ -26,7 +26,7 @@ In your top-level application, `app`, mount the sub-application, `subapi`.
In this case, it will be mounted at the path `/subapi`:
{* ../../docs_src/sub_applications/tutorial001.py hl[11, 19] *}
{* ../../docs_src/sub_applications/tutorial001_py39.py hl[11, 19] *}
### Check the automatic API docs { #check-the-automatic-api-docs }

0
docs_src/sub_applications/tutorial001.py → docs_src/sub_applications/tutorial001_py39.py

2
tests/test_tutorial/test_sub_applications/test_tutorial001.py

@ -1,6 +1,6 @@
from fastapi.testclient import TestClient
from docs_src.sub_applications.tutorial001 import app
from docs_src.sub_applications.tutorial001_py39 import app
client = TestClient(app)

Loading…
Cancel
Save