Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for rendered (0.31 sec)

  1. docs/en/docs/tutorial/metadata.md

    You can set them as follows:
    
    ```Python hl_lines="3-16  19-32"
    {!../../../docs_src/metadata/tutorial001.py!}
    ```
    
    !!! tip
        You can write Markdown in the `description` field and it will be rendered in the output.
    
    With this configuration, the automatic API docs would look like:
    
    <img src="/img/tutorial/metadata/image01.png">
    
    ## License identifier
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  2. docs/de/docs/reference/responses.md

                - raw_headers
                - render
                - init_headers
                - headers
                - set_cookie
                - delete_cookie
    
    ::: fastapi.responses.ORJSONResponse
        options:
            members:
                - charset
                - status_code
                - media_type
                - body
                - background
                - raw_headers
                - render
                - init_headers
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Feb 19 15:53:39 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/templates.md

    * Import `Jinja2Templates`.
    * Create a `templates` object that you can re-use later.
    * Declare a `Request` parameter in the *path operation* that will return a template.
    * Use the `templates` you created to render and return a `TemplateResponse`, pass the name of the template, the request object, and a "context" dictionary with key-value pairs to be used inside of the Jinja2 template.
    
    ```Python hl_lines="4  11  15-18"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 22:25:37 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  4. scripts/docs.py

        frontmatter_end = match_pre.end()
        pre_end = match_start.end()
        post_start = match_end.start()
        template = Template(index_sponsors_template)
        message = template.render(sponsors=sponsors)
        pre_content = content[frontmatter_end:pre_end]
        post_content = content[post_start:]
        new_content = pre_content + message + post_content
        return new_content
    
    
    @app.command()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 22 19:26:14 GMT 2024
    - 10.9K bytes
    - Viewed (1)
  5. docs/en/docs/reference/responses.md

                - raw_headers
                - render
                - init_headers
                - headers
                - set_cookie
                - delete_cookie
    
    ::: fastapi.responses.ORJSONResponse
        options:
            members:
                - charset
                - status_code
                - media_type
                - body
                - background
                - raw_headers
                - render
                - init_headers
    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)
  6. fastapi/responses.py

        Read more about it in the
        [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/).
        """
    
        def render(self, content: Any) -> bytes:
            assert ujson is not None, "ujson must be installed to use UJSONResponse"
            return ujson.dumps(content, ensure_ascii=False).encode("utf-8")
    
    
    class ORJSONResponse(JSONResponse):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  7. .github/DISCUSSION_TEMPLATE/questions.yml

          placeholder: |
            from fastapi import FastAPI
    
            app = FastAPI()
    
    
            @app.get("/")
            def read_root():
                return {"Hello": "World"}
          render: python
        validations:
          required: true
      - type: textarea
        id: description
        attributes:
          label: Description
          description: |
            What is the problem, question, or error?
    
    Others
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Aug 03 15:59:41 GMT 2023
    - 5.8K bytes
    - Viewed (1)
  8. 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)
  9. docs/em/docs/advanced/custom-response.md

    ➡ī¸ đŸ’Ŧ 👆 💚 âšĢī¸ 📨 🔂 &amp; 📁 đŸŽģ, 👆 💚 ⚙ī¸ 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)
  10. scripts/mkdocs_hooks.py

                        first_child.read_source(config=config)
                        new_title = first_child.title or new_title
                # Creating a new section makes it render it collapsed by default
                # no idea why, so, let's just modify the existing one
                # new_section = Section(title=new_title, children=new_children)
                item.title = new_title
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 5.1K bytes
    - Viewed (0)
Back to top