Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for html (0.12 sec)

  1. docs/de/docs/advanced/templates.md

    ## Templates erstellen
    
    Dann können Sie unter `templates/item.html` ein Template erstellen, mit z. B. folgendem Inhalt:
    
    ```jinja hl_lines="7"
    {!../../../docs_src/templates/templates/item.html!}
    ```
    
    ### Template-Kontextwerte
    
    Im HTML, welches enthält:
    
    {% raw %}
    
    ```jinja
    Item ID: {{ id }}
    ```
    
    {% endraw %}
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:19 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  2. docs/pt/docs/advanced/templates.md

    ## Escrevendo Templates
    
    Então você pode escrever um template em `templates/item.html`, por exemplo:
    
    ```jinja hl_lines="7"
    {!../../../docs_src/templates/templates/item.html!}
    ```
    
    ### Interpolação de Valores no Template
    
    No código HTML que contém:
    
    {% raw %}
    
    ```jinja
    Item ID: {{ id }}
    ```
    
    {% endraw %}
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 28 04:05:17 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/templates.md

    ## Writing templates
    
    Then you can write a template at `templates/item.html` with, for example:
    
    ```jinja hl_lines="7"
    {!../../../docs_src/templates/templates/item.html!}
    ```
    
    ### Template Context Values
    
    In the HTML that contains:
    
    {% raw %}
    
    ```jinja
    Item ID: {{ id }}
    ```
    
    {% endraw %}
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 22:25:37 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  4. docs/zh/docs/advanced/templates.md

        通过声明 `response_class=HTMLResponse`,API 文档就能识别响应的对象是 HTML。
    
    !!! note "技术细节"
    
        您还可以使用 `from starlette.templating import Jinja2Templates`。
    
        **FastAPI** 的 `fastapi.templating` 只是为开发者提供的快捷方式。实际上,绝大多数可用响应都直接继承自 Starlette。 `Request` 与 `StaticFiles` 也一样。
    
    ## 编写模板
    
    编写模板 `templates/item.html`,代码如下:
    
    ```jinja hl_lines="7"
    {!../../../docs_src/templates/templates/item.html!}
    ```
    
    它会显示从 **context** 字典中提取的 `id`:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:45:16 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  5. docs/em/docs/advanced/templates.md

        **FastAPI** 🚚 🎏 `starlette.templating` `fastapi.templating` 🏪 👆, 👩‍💻. ✋️ 🌅 💪 📨 👟 🔗 ⚪️➡️ 💃. 🎏 ⏮️ `Request` & `StaticFiles`.
    
    ## ✍ 📄
    
    ⤴️ 👆 💪 ✍ 📄 `templates/item.html` ⏮️:
    
    ```jinja hl_lines="7"
    {!../../../docs_src/templates/templates/item.html!}
    ```
    
    ⚫️ 🔜 🎦 `id` ✊ ⚪️➡️ "🔑" `dict` 👆 🚶‍♀️:
    
    ```Python
    {"request": request, "id": id}
    ```
    
    ## 📄 & 🎻 📁
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Dec 26 20:12:34 GMT 2023
    - 2.1K bytes
    - Viewed (0)
Back to top