- Sort Score
- Result 10 results
- Languages All
Results 211 - 220 of 274 for read_items (0.04 sec)
-
docs/ru/docs/advanced/templates.md
Таким образом, фрагмент: {% raw %} ```jinja <a href="{{ url_for('read_item', id=id) }}"> ``` {% endraw %} ...сгенерирует ссылку на тот же URL, который обрабатывается *функцией-обработчиком пути* `read_item(id=id)`. Например, для ID `42` это отрендерится как: ```html <a href="/items/42"> ```Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 5.1K bytes - Viewed (0) -
docs_src/query_params/tutorial002_py310.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 219 bytes - Viewed (0) -
docs_src/templates/templates/item.html
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Thu Jan 11 22:25:37 UTC 2024 - 235 bytes - Viewed (0) -
docs_src/query_params/tutorial002_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 251 bytes - Viewed (0) -
docs/zh/docs/advanced/templates.md
```html Item ID: 42 ``` ### 模板 `url_for` 参数 你还可以在模板内使用 `url_for()`,其参数与*路径操作函数*的参数相同. 所以,该部分: {% raw %} ```jinja <a href="{{ url_for('read_item', id=id) }}"> ``` {% endraw %} ...将生成一个与处理*路径操作函数* `read_item(id=id)`的URL相同的链接 例如。当ID为 `42`时, 会渲染成: ```html <a href="/items/42"> ``` ## 模板与静态文件Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 2.7K bytes - Viewed (0) -
docs_src/additional_responses/tutorial001_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 506 bytes - Viewed (0) -
docs_src/path_params/tutorial001_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 138 bytes - Viewed (0) -
docs/en/docs/advanced/templates.md
So, the section with: {% raw %} ```jinja <a href="{{ url_for('read_item', id=id) }}"> ``` {% endraw %} ...will generate a link to the same URL that would be handled by the *path operation function* `read_item(id=id)`. For example, with an ID of `42`, this would render: ```html <a href="/items/42"> ```Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.5K bytes - Viewed (0) -
tests/test_additional_response_extra.py
from fastapi import APIRouter, FastAPI from fastapi.testclient import TestClient router = APIRouter() sub_router = APIRouter() app = FastAPI() @sub_router.get("/") def read_item(): return {"id": "foo"} router.include_router(sub_router, prefix="/items") app.include_router(router) client = TestClient(app) def test_path_operation(): response = client.get("/items/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.2K bytes - Viewed (0) -
docs_src/additional_responses/tutorial004_py310.py
} app = FastAPI() @app.get( "/items/{item_id}", response_model=Item, responses={**responses, 200: {"content": {"image/png": {}}}}, ) async def read_item(item_id: str, img: bool | None = None): if img: return FileResponse("image.png", media_type="image/png") else:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 10 08:55:32 UTC 2025 - 669 bytes - Viewed (0)