Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for rerender (0.32 sec)

  1. docs/de/docs/advanced/custom-response.md

    Sie könnten eine `CustomORJSONResponse` erstellen. Das Wichtigste, was Sie tun müssen, ist, eine `Response.render(content)`-Methode zu erstellen, die den Inhalt als `bytes` zurückgibt:
    
    ```Python hl_lines="9-14  17"
    {!../../../docs_src/custom_response/tutorial009c.py!}
    ```
    
    Statt:
    
    ```json
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 23 13:05:12 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/custom-response.md

    Let's say you want it to return indented and formatted JSON, so you want to use the orjson option `orjson.OPT_INDENT_2`.
    
    You could create a `CustomORJSONResponse`. The main thing you have to do is create a `Response.render(content)` method that returns the content as `bytes`:
    
    ```Python hl_lines="9-14  17"
    {!../../../docs_src/custom_response/tutorial009c.py!}
    ```
    
    Now instead of returning:
    
    ```json
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  3. docs/em/docs/advanced/custom-response.md

    ➡️ 💬 👆 💚 ⚫️ 📨 🔂 & 📁 🎻, 👆 💚 ⚙️ Orjson 🎛 `orjson.OPT_INDENT_2`.
    
    👆 💪 ✍ `CustomORJSONResponse`. 👑 👜 👆 ✔️ ✍ `Response.render(content)` 👩‍🔬 👈 📨 🎚 `bytes`:
    
    ```Python hl_lines="9-14  17"
    {!../../../docs_src/custom_response/tutorial009c.py!}
    ```
    
    🔜 ↩️ 🛬:
    
    ```json
    {"message": "Hello World"}
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 9.8K bytes
    - Viewed (0)
Back to top