Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 146 for html (0.18 sec)

  1. docs/en/overrides/main.html

    {% extends "base.html" %}
    
    {% block announce %}
    <div class="announce-wrapper">
      <div id="announce-left">
        <div class="item">
          <a class="announce-link" href="https://twitter.com/fastapi" target="_blank">
            <span class="twemoji twitter">
              {% include ".icons/fontawesome/brands/twitter.svg" %}
            </span> Follow <strong>@fastapi</strong> on <strong>Twitter</strong> to stay updated
          </a>
        </div>
        <div class="item">
    HTML
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Mar 25 23:10:11 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  2. fastapi/openapi/docs.py

        })"""
    
        if init_oauth:
            html += f"""
            ui.initOAuth({json.dumps(jsonable_encoder(init_oauth))})
            """
    
        html += """
        </script>
        </body>
        </html>
        """
        return HTMLResponse(html)
    
    
    def get_redoc_html(
        *,
        openapi_url: Annotated[
            str,
            Doc(
                """
                The OpenAPI URL that ReDoc should load and use.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 10.1K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/custom-response.md

    ```Python hl_lines="7  21  23"
    {!../../../docs_src/custom_response/tutorial004.py!}
    ```
    
    In this example, the function `generate_html_response()` already generates and returns a `Response` instead of returning the HTML in a `str`.
    
    By returning the result of calling `generate_html_response()`, you are already returning a `Response` that will override the default **FastAPI** behavior.
    
    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)
  4. fastapi/openapi/models.py

        # Ref: JSON Schema Validation 2020-12: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-vocabularies-for-semantic-c
        # Vocabularies for Semantic Content With "format"
        format: Optional[str] = None
        # Ref: JSON Schema Validation 2020-12: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-a-vocabulary-for-the-conten
        # A Vocabulary for the Contents of String-Encoded Data
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 22:49:33 GMT 2024
    - 15K bytes
    - Viewed (1)
  5. docs/de/docs/tutorial/dependencies/dependencies-with-yield.md

    !!! note "Technische Details"
        Jede Funktion, die dekoriert werden kann mit:
    
        * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager" class="external-link" target="_blank">`@contextlib.contextmanager`</a> oder
        * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager" class="external-link" target="_blank">`@contextlib.asynccontextmanager`</a>
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 18:10:29 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  6. docs/en/docs/reference/responses.md

    # Custom Response Classes - File, HTML, Redirect, Streaming, etc.
    
    There are several custom response classes you can use to create an instance and return them directly from your *path operations*.
    
    Read more about it in the [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/).
    
    You can import them directly from `fastapi.responses`:
    
    ```python
    from fastapi.responses import (
        FileResponse,
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  7. docs/de/docs/reference/openapi/docs.md

    ::: fastapi.openapi.docs.get_swagger_ui_html
    
    ::: fastapi.openapi.docs.get_redoc_html
    
    ::: fastapi.openapi.docs.get_swagger_ui_oauth2_redirect_html
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 18:15:17 GMT 2024
    - 395 bytes
    - Viewed (0)
  8. 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 22:45:16 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  9. docs/ru/docs/tutorial/dependencies/dependencies-with-yield.md

    !!! note "Технические детали"
        Любая функция, с которой может работать:
    
        * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager" class="external-link" target="_blank">`@contextlib.contextmanager`</a> или
        * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager" class="external-link" target="_blank">`@contextlib.asynccontextmanager`</a>
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 04:21:06 GMT 2024
    - 19.6K bytes
    - Viewed (0)
  10. docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md

    !!! tip "提示"
        确保只使用一次 `yield` 。
    
    !!! note "技术细节"
    
        任何一个可以与以下内容一起使用的函数:
    
        * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager" class="external-link" target="_blank">`@contextlib.contextmanager`</a> 或者
        * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager" class="external-link" target="_blank">`@contextlib.asynccontextmanager`</a>
    
        都可以作为 **FastAPI** 的依赖项。
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.3K bytes
    - Viewed (0)
Back to top