Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 220 for head_item (0.31 seconds)

  1. docs_src/templates/templates/item.html

    <html>
    <head>
        <title>Item Details</title>
        <link href="{{ url_for('static', path='/styles.css') }}" rel="stylesheet">
    </head>
    <body>
        <h1><a href="{{ url_for('read_item', id=id) }}">Item ID: {{ id }}</a></h1>
    </body>
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Jan 11 22:25:37 GMT 2024
    - 235 bytes
    - Click Count (0)
  2. 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">
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 3.4K bytes
    - Click Count (0)
  3. docs/fr/docs/advanced/templates.md

    Ainsi, la section suivante :
    
    {% raw %}
    
    ```jinja
    <a href="{{ url_for('read_item', id=id) }}">
    ```
    
    {% endraw %}
    
    ... générera un lien vers la même URL que celle gérée par la *fonction de chemin d'accès* `read_item(id=id)`.
    
    Par exemple, avec un ID de `42`, cela rendrait :
    
    ```html
    <a href="/items/42">
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 3.7K bytes
    - Click Count (0)
  4. docs/zh/docs/advanced/templates.md

    ```
    
    ### 模板 `url_for` 参数 { #template-url-for-arguments }
    
    你还可以在模板内使用 `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">
    ```
    
    ## 模板与静态文件 { #templates-and-static-files }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 3K bytes
    - Click Count (0)
  5. 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">
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:56:20 GMT 2026
    - 5K bytes
    - Click Count (0)
  6. docs/tr/docs/advanced/templates.md

    Dolayısıyla şu bölüm:
    
    {% raw %}
    
    ```jinja
    <a href="{{ url_for('read_item', id=id) }}">
    ```
    
    {% endraw %}
    
    ...*path operation function* olan `read_item(id=id)` tarafından handle edilecek URL'nin aynısına bir link üretir.
    
    Örneğin ID değeri `42` ise, şu şekilde render edilir:
    
    ```html
    <a href="/items/42">
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 3.8K bytes
    - Click Count (0)
  7. 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:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 10 08:55:32 GMT 2025
    - 669 bytes
    - Click Count (0)
  8. docs_src/path_operation_advanced_configuration/tutorial002_py310.py

    from fastapi import FastAPI
    from fastapi.routing import APIRoute
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items():
        return [{"item_id": "Foo"}]
    
    
    def use_route_names_as_operation_ids(app: FastAPI) -> None:
        """
        Simplify operation IDs so that generated API clients have simpler function
        names.
    
        Should be called only after all routes have been added.
        """
        for route in app.routes:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 572 bytes
    - Click Count (0)
  9. docs_src/additional_responses/tutorial001_py310.py

        id: str
        value: str
    
    
    class Message(BaseModel):
        message: str
    
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}", response_model=Item, responses={404: {"model": Message}})
    async def read_item(item_id: str):
        if item_id == "foo":
            return {"id": "foo", "value": "there goes my hero"}
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 506 bytes
    - Click Count (0)
  10. docs_src/path_params/tutorial001_py310.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 138 bytes
    - Click Count (0)
Back to Top