Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for url_for (0.2 sec)

  1. docs/en/docs/advanced/templates.md

    For example, with an ID of `42`, this would render:
    
    ```html
    Item ID: 42
    ```
    
    ### Template `url_for` Arguments
    
    You can also use `url_for()` inside of the template, it takes as arguments the same arguments that would be used by your *path operation function*.
    
    So, the section with:
    
    {% raw %}
    
    ```jinja
    <a href="{{ url_for('read_item', id=id) }}">
    ```
    
    {% endraw %}
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 22:25:37 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  2. 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>
    HTML
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 22:25:37 GMT 2024
    - 235 bytes
    - Viewed (0)
  3. docs/pt/docs/advanced/templates.md

    Por exemplo, dado um ID de valor `42`, aparecerá:
    
    ```html
    Item ID: 42
    ```
    
    ### Argumentos do `url_for`
    
    Você também pode usar `url_for()` dentro do template, ele recebe como argumentos os mesmos argumentos que seriam usados pela sua *path operation function*.
    
    Logo, a seção com:
    
    {% raw %}
    
    ```jinja
    <a href="{{ url_for('read_item', id=id) }}">
    ```
    
    {% endraw %}
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Mar 28 04:05:17 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  4. docs/de/docs/advanced/templates.md

    ```html
    Item ID: 42
    ```
    
    ### Template-`url_for`-Argumente
    
    Sie können `url_for()` auch innerhalb des Templates verwenden, es nimmt als Argumente dieselben Argumente, die von Ihrer *Pfadoperation-Funktion* verwendet werden.
    
    Der Abschnitt mit:
    
    {% raw %}
    
    ```jinja
    <a href="{{ url_for('read_item', id=id) }}">
    ```
    
    {% endraw %}
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:19 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  5. docs/zh/docs/advanced/templates.md

    ```
    
    它会显示从 **context** 字典中提取的 `id`:
    
    ```Python
    {"request": request, "id": id}
    ```
    
    ## 模板与静态文件
    
    在模板内部使用 `url_for()`,例如,与挂载的 `StaticFiles` 一起使用。
    
    ```jinja hl_lines="4"
    {!../../../docs_src/templates/templates/item.html!}
    ```
    
    本例中,使用 `url_for()` 为模板添加 CSS 文件 `static/styles.css` 链接:
    
    ```CSS hl_lines="4"
    {!../../../docs_src/templates/static/styles.css!}
    ```
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:45:16 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  6. docs/en/docs/reference/websockets.md

                - url
                - base_url
                - headers
                - query_params
                - path_params
                - cookies
                - client
                - state
                - url_for
                - client_state
                - application_state
                - receive
                - send
                - accept
                - receive_text
                - receive_bytes
                - receive_json
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  7. docs/de/docs/reference/websockets.md

                - url
                - base_url
                - headers
                - query_params
                - path_params
                - cookies
                - client
                - state
                - url_for
                - client_state
                - application_state
                - receive
                - send
                - accept
                - receive_text
                - receive_bytes
                - receive_json
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:16:27 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  8. docs/em/docs/advanced/templates.md

    ```jinja hl_lines="7"
    {!../../../docs_src/templates/templates/item.html!}
    ```
    
    ⚫️ 🔜 🎦 `id` ✊ ⚪️➡️ "🔑" `dict` 👆 🚶‍♀️:
    
    ```Python
    {"request": request, "id": id}
    ```
    
    ## 📄 &amp; 🎻 📁
    
    &amp; 👆 💪 ⚙️ `url_for()` 🔘 📄, &amp; ⚙️ ⚫️, 🖼, ⏮️ `StaticFiles` 👆 📌.
    
    ```jinja hl_lines="4"
    {!../../../docs_src/templates/templates/item.html!}
    ```
    
    👉 🖼, ⚫️ 🔜 🔗 🎚 📁 `static/styles.css` ⏮️:
    
    ```CSS hl_lines="4"
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Dec 26 20:12:34 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  9. docs/en/docs/release-notes.md

    * ✏️ Remove broken links from `external_links.yml`. PR [#10943](https://github.com/tiangolo/fastapi/pull/10943) by [@Torabek](https://github.com/Torabek).
    * 📝 Update template docs with more info about `url_for`. PR [#5937](https://github.com/tiangolo/fastapi/pull/5937) by [@EzzEddin](https://github.com/EzzEddin).
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 19:30:49 GMT 2024
    - 384.6K bytes
    - Viewed (1)
Back to top