📝 Update includes for docs/en/docs/advanced/response-directly.md (#12803)

This commit is contained in:
Baldeep Singh Handa
2024-11-09 11:54:19 +00:00
committed by GitHub
parent 835123ee28
commit 22eafff2d8

View File

@@ -34,9 +34,7 @@ For example, you cannot put a Pydantic model in a `JSONResponse` without first c
For those cases, you can use the `jsonable_encoder` to convert your data before passing it to a response:
```Python hl_lines="6-7 21-22"
{!../../docs_src/response_directly/tutorial001.py!}
```
{* ../../docs_src/response_directly/tutorial001.py hl[6:7,21:22] *}
/// note | "Technical Details"
@@ -56,9 +54,7 @@ Let's say that you want to return an <a href="https://en.wikipedia.org/wiki/XML"
You could put your XML content in a string, put that in a `Response`, and return it:
```Python hl_lines="1 18"
{!../../docs_src/response_directly/tutorial002.py!}
```
{* ../../docs_src/response_directly/tutorial002.py hl[1,18] *}
## Notes