- Sort Score
- Num 10 results
- Language All
Results 101 - 110 of 718 for render (0.04 seconds)
-
docs/tr/docs/tutorial/path-params.md
`Enum`'u import edin ve `str` ile `Enum`'dan miras alan bir alt sınıf oluşturun. `str`'den miras aldığınızda API dokümanları değerlerin `string` tipinde olması gerektiğini anlayabilir ve doğru şekilde render edebilir. Sonra, kullanılabilir geçerli değerler olacak sabit değerli class attribute'ları oluşturun: {* ../../docs_src/path_params/tutorial005_py310.py hl[1,6:9] *} /// tip | İpucu
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 9.7K bytes - Click Count (0) -
docs/de/docs/advanced/custom-response.md
* `headers` – Ein `dict` von Strings. * `media_type` – Ein `str`, der den Medientyp angibt. Z. B. `"text/html"`. FastAPI (eigentlich Starlette) fügt automatisch einen Content-Length-Header ein. Außerdem wird es einen Content-Type-Header einfügen, der auf dem `media_type` basiert, und für Texttypen einen Zeichensatz (charset) anfügen. {* ../../docs_src/response_directly/tutorial002_py310.py hl[1,18] *}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 12.5K bytes - Click Count (0) -
docs/en/docs/advanced/custom-response.md
* `headers` - A `dict` of strings. * `media_type` - A `str` giving the media type. E.g. `"text/html"`. FastAPI (actually Starlette) will automatically include a Content-Length header. It will also include a Content-Type header, based on the `media_type` and appending a charset for text types. {* ../../docs_src/response_directly/tutorial002_py310.py hl[1,18] *} ### `HTMLResponse` { #htmlresponse }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 11K bytes - Click Count (0) -
docs/ru/docs/advanced/custom-response.md
Скажем, вы хотите, чтобы возвращался отформатированный JSON с отступами, то есть хотите использовать опцию orjson `orjson.OPT_INDENT_2`. Вы могли бы создать `CustomORJSONResponse`. Главное, что вам нужно сделать — реализовать метод `Response.render(content)`, который возвращает содержимое как `bytes`: {* ../../docs_src/custom_response/tutorial009c_py310.py hl[9:14,17] *} Теперь вместо того, чтобы возвращать: ```json {"message": "Hello World"} ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 17.6K bytes - Click Count (0) -
docs/uk/docs/advanced/custom-response.md
Припустімо, ви хочете, щоб повертався відформатований із відступами JSON, тож ви хочете використати опцію orjson `orjson.OPT_INDENT_2`. Ви можете створити `CustomORJSONResponse`. Головне, що потрібно зробити, це створити метод `Response.render(content)`, який повертає вміст як `bytes`: {* ../../docs_src/custom_response/tutorial009c_py310.py hl[9:14,17] *} Тепер замість повернення: ```json {"message": "Hello World"} ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 17K bytes - Click Count (0) -
docs/tr/docs/advanced/custom-response.md
Bir `CustomORJSONResponse` oluşturabilirsiniz. Burada yapmanız gereken temel şey, content’i `bytes` olarak döndüren bir `Response.render(content)` metodu yazmaktır: {* ../../docs_src/custom_response/tutorial009c_py310.py hl[9:14,17] *} Artık şunu döndürmek yerine: ```json {"message": "Hello World"} ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 11.9K bytes - Click Count (0) -
docs/ko/docs/advanced/custom-response.md
예를 들어, [`orjson`](https://github.com/ijl/orjson)을 일부 설정과 함께 사용하고 싶다고 가정해봅시다. 들여쓰기 및 포맷된 JSON을 반환하고 싶다면, orjson 옵션 `orjson.OPT_INDENT_2`를 사용할 수 있습니다. `CustomORJSONResponse`를 생성할 수 있습니다. 여기서 핵심은 `Response.render(content)` 메서드를 생성하여 내용을 `bytes`로 반환하는 것입니다: {* ../../docs_src/custom_response/tutorial009c_py310.py hl[9:14,17] *} 이제 다음 대신: ```json {"message": "Hello World"} ``` ...이 응답은 이렇게 반환됩니다:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 12.4K bytes - Click Count (0) -
docs/zh/docs/advanced/custom-response.md
你可以创建你自己的自定义响应类,继承自 `Response` 并使用它。 例如,假设你想用一些设置来使用 [`orjson`](https://github.com/ijl/orjson)。 假设你想让它返回带缩进、格式化的 JSON,因此你想使用 orjson 选项 `orjson.OPT_INDENT_2`。 你可以创建一个 `CustomORJSONResponse`。你需要做的主要事情是实现一个 `Response.render(content)` 方法,并返回 `bytes`: {* ../../docs_src/custom_response/tutorial009c_py310.py hl[9:14,17] *} 现在,不再是返回: ```json {"message": "Hello World"} ``` ...这个响应将返回: ```json {Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 10.4K bytes - Click Count (0) -
docs/pt/docs/advanced/custom-response.md
Você poderia criar uma `CustomORJSONResponse`. A principal coisa que você tem que fazer é criar um método `Response.render(content)` que retorne o conteúdo como `bytes`: {* ../../docs_src/custom_response/tutorial009c_py310.py hl[9:14,17] *} Agora em vez de retornar: ```json {"message": "Hello World"} ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:43 GMT 2026 - 12K bytes - Click Count (0) -
docs/fr/docs/advanced/custom-response.md
Disons que vous voulez renvoyer du JSON indenté et formaté, donc vous voulez utiliser l'option orjson `orjson.OPT_INDENT_2`. Vous pourriez créer une `CustomORJSONResponse`. L'essentiel est de créer une méthode `Response.render(content)` qui renvoie le contenu en `bytes` : {* ../../docs_src/custom_response/tutorial009c_py310.py hl[9:14,17] *} Maintenant, au lieu de renvoyer : ```json {"message": "Hello World"} ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 12.3K bytes - Click Count (0)