Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 95 for Change (0.31 sec)

  1. docs/em/docs/advanced/response-change-status-code.md

    ## ⚙️ `Response` 🔢
    
    👆 💪 📣 🔢 🆎 `Response` 👆 *➡ 🛠️ 🔢* (👆 💪 🍪 & 🎚).
    
    & ⤴️ 👆 💪 ⚒ `status_code` 👈 *🔀* 📨 🎚.
    
    ```Python hl_lines="1  9  12"
    {!../../../docs_src/response_change_status_code/tutorial001.py!}
    ```
    
    & ⤴️ 👆 💪 📨 🙆 🎚 👆 💪, 👆 🛎 🔜 ( `dict`, 💽 🏷, ♒️).
    
    & 🚥 👆 📣 `response_model`, ⚫️ 🔜 ⚙️ ⛽ & 🗜 🎚 👆 📨.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  2. docs/zh/docs/advanced/response-change-status-code.md

    对于这些情况,你可以使用一个`Response`参数。
    
    ## 使用 `Response` 参数
    
    你可以在你的*路径操作函数*中声明一个`Response`类型的参数(就像你可以为cookies和头部做的那样)。
    
    然后你可以在这个*临时*响应对象中设置`status_code`。
    
    ```Python hl_lines="1  9  12"
    {!../../../docs_src/response_change_status_code/tutorial001.py!}
    ```
    
    然后你可以像平常一样返回任何你需要的对象(例如一个`dict`或者一个数据库模型)。如果你声明了一个`response_model`,它仍然会被用来过滤和转换你返回的对象。
    
    **FastAPI**将使用这个临时响应来提取状态码(也包括cookies和头部),并将它们放入包含你返回的值的最终响应中,该响应由任何`response_model`过滤。
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jun 10 20:30:28 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/response-change-status-code.md

    # Response - Change Status Code
    
    You probably read before that you can set a default [Response Status Code](../tutorial/response-status-code.md){.internal-link target=_blank}.
    
    But in some cases you need to return a different status code than the default.
    
    ## Use case
    
    For example, imagine that you want to return an HTTP status code of "OK" `200` by default.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  4. docs/de/docs/advanced/response-change-status-code.md

    Anschließend können Sie den `status_code` in diesem *vorübergehenden* Response-Objekt festlegen.
    
    ```Python hl_lines="1  9  12"
    {!../../../docs_src/response_change_status_code/tutorial001.py!}
    ```
    
    Und dann können Sie wie gewohnt jedes benötigte Objekt zurückgeben (ein `dict`, ein Datenbankmodell usw.).
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:18:58 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  5. docs/es/docs/advanced/response-change-status-code.md

    Y luego puedes establecer el `status_code` en ese objeto de respuesta *temporal*.
    
    ```Python hl_lines="1  9  12"
    {!../../../docs_src/response_change_status_code/tutorial001.py!}
    ```
    
    Y luego puedes retornar cualquier objeto que necesites, como normalmente lo harías (un `dict`, un modelo de base de datos, etc).
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Feb 06 19:56:23 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  6. tests/test_response_change_status_code.py

    Samuel Colvin <******@****.***> 1586320658 +0100
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Apr 08 04:37:38 GMT 2020
    - 589 bytes
    - Viewed (0)
  7. docs/en/docs/how-to/configure-swagger-ui.md

    <img src="/img/tutorial/extending-openapi/image03.png">
    
    ## Change the Theme
    
    The same way you could set the syntax highlighting theme with the key `"syntaxHighlight.theme"` (notice that it has a dot in the middle):
    
    ```Python hl_lines="3"
    {!../../../docs_src/configure_swagger_ui/tutorial002.py!}
    ```
    
    That configuration would change the syntax highlighting color theme:
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/dependencies/dependencies-with-yield.md

        Note over client,operation: Response is already sent, can't change it anymore
        opt Tasks
            operation -->> tasks: Send background tasks
        end
        opt Raise other exception
            tasks -->> dep: Raise other exception
        end
        Note over dep: After yield
        opt Handle other exception
            dep -->> dep: Handle exception, can't change response. E.g. close DB session.
        end
    ```
    
    !!! info
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  9. docs/en/docs/contributing.md

    * Do not change anything enclosed in "``" (inline code).
    
    * In lines starting with `===` or `!!!`, translate only the ` "... Text ..."` part. Leave the rest unchanged.
    
    * You can translate info boxes like `!!! warning` with for example `!!! warning "Achtung"`. But do not change the word immediately after the `!!!`, it determines the color of the info box.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 17:42:43 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  10. docs/en/docs/how-to/async-sql-encode-databases.md

    * Create a `database` object.
    
    ```Python hl_lines="3  9  12"
    {!../../../docs_src/async_sql_databases/tutorial001.py!}
    ```
    
    !!! tip
        If you were connecting to a different database (e.g. PostgreSQL), you would need to change the `DATABASE_URL`.
    
    ## Create the tables
    
    In this case, we are creating the tables in the same Python file, but in production, you would probably want to create them with Alembic, integrated with migrations, etc.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.3K bytes
    - Viewed (0)
Back to top