Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for DateTime (0.2 sec)

  1. docs/zh/docs/tutorial/body-updates.md

    ## 用 `PUT` 更新数据
    
    更新数据请用 <a href="https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Methods/PUT" class="external-link" target="_blank">HTTP `PUT`</a> 操作。
    
    把输入数据转换为以 JSON 格式存储的数据(比如,使用 NoSQL 数据库时),可以使用 `jsonable_encoder`。例如,把 `datetime` 转换为 `str`。
    
    ```Python hl_lines="30-35"
    {!../../../docs_src/body_updates/tutorial001.py!}
    ```
    
    `PUT` 用于接收替换现有数据的数据。
    
    ### 关于更新数据的警告
    
    用 `PUT` 把数据项 `bar` 更新为以下内容时:
    
    ```Python
    {
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/body-updates.md

    Sie können den `jsonable_encoder` verwenden, um die empfangenen Daten in etwas zu konvertieren, das als JSON gespeichert werden kann (in z. B. einer NoSQL-Datenbank). Zum Beispiel, um ein `datetime` in einen `str` zu konvertieren.
    
    === "Python 3.10+"
    
        ```Python hl_lines="28-33"
        {!> ../../../docs_src/body_updates/tutorial001_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="30-35"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:26:37 GMT 2024
    - 6.5K bytes
    - Viewed (0)
  3. docs/ru/docs/tutorial/body-updates.md

        * Это сравнимо с повторным использованием метода модели `.dict()`, но при этом происходит проверка (и преобразование) значений в типы данных, которые могут быть преобразованы в JSON, например, `datetime` в `str`.
    * Сохранить данные в своей БД.
    * Вернуть обновленную модель.
    
    === "Python 3.10+"
    
        ```Python hl_lines="28-35"
        {!> ../../../docs_src/body_updates/tutorial002_py310.py!}
        ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 23 13:55:32 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/body-updates.md

    You can use the `jsonable_encoder` to convert the input data to data that can be stored as JSON (e.g. with a NoSQL database). For example, converting `datetime` to `str`.
    
    === "Python 3.10+"
    
        ```Python hl_lines="28-33"
        {!> ../../../docs_src/body_updates/tutorial001_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="30-35"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  5. docs/em/docs/tutorial/body-updates.md

    ℹ 🏬 👆 💪 ⚙️ <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT" class="external-link" target="_blank">🇺🇸🔍 `PUT`</a> 🛠️.
    
    👆 💪 ⚙️ `jsonable_encoder` 🗜 🔢 💽 📊 👈 💪 🏪 🎻 (✅ ⏮️ ☁ 💽). 🖼, 🏭 `datetime` `str`.
    
    === "🐍 3️⃣.6️⃣ &amp; 🔛"
    
        ```Python hl_lines="30-35"
        {!> ../../../docs_src/body_updates/tutorial001.py!}
        ```
    
    === "🐍 3️⃣.9️⃣ &amp; 🔛"
    
        ```Python hl_lines="30-35"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  6. docs/ja/docs/tutorial/body-updates.md

    項目を更新するには<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT" class="external-link" target="_blank">HTTPの`PUT`</a>操作を使用することができます。
    
    `jsonable_encoder`を用いて、入力データをJSON形式で保存できるデータに変換することができます(例:NoSQLデータベース)。例えば、`datetime`を`str`に変換します。
    
    ```Python hl_lines="30 31 32 33 34 35"
    {!../../../docs_src/body_updates/tutorial001.py!}
    ```
    
    既存のデータを置き換えるべきデータを受け取るために`PUT`は使用されます。
    
    ### 置換についての注意
    
    つまり、`PUT`を使用して以下のボディで項目`bar`を更新したい場合は:
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.2K bytes
    - Viewed (0)
Back to top