mirror of https://github.com/tiangolo/fastapi.git
Remove code examples for Python 3.8 in `templates`
This commit is contained in:
parent
579889a79a
commit
20942aef86
|
|
@ -27,7 +27,7 @@ $ pip install jinja2
|
|||
* Declare a `Request` parameter in the *path operation* that will return a template.
|
||||
* Use the `templates` you created to render and return a `TemplateResponse`, pass the name of the template, the request object, and a "context" dictionary with key-value pairs to be used inside of the Jinja2 template.
|
||||
|
||||
{* ../../docs_src/templates/tutorial001.py hl[4,11,15:18] *}
|
||||
{* ../../docs_src/templates/tutorial001_py39.py hl[4,11,15:18] *}
|
||||
|
||||
/// note
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ def test_main():
|
|||
shutil.rmtree("./templates")
|
||||
shutil.copytree("./docs_src/templates/templates/", "./templates")
|
||||
shutil.copytree("./docs_src/templates/static/", "./static")
|
||||
from docs_src.templates.tutorial001 import app
|
||||
from docs_src.templates.tutorial001_py39 import app
|
||||
|
||||
client = TestClient(app)
|
||||
response = client.get("/items/foo")
|
||||
|
|
|
|||
Loading…
Reference in New Issue