Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 667 for render (0.23 sec)

  1. 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 May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 22:25:37 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  2. 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 May 05 07:19:11 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  3. .github/ISSUE_TEMPLATE/tensorflow_issue_template.yaml

          placeholder: Tell us what you see!
          value:
          render: shell
        validations:
          required: true
      - type: textarea
        id: logs
        attributes:
          label: Relevant log output
          description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
    Others
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Jun 28 18:25:42 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  4. docs_src/custom_response/tutorial009c.py

    from typing import Any
    
    import orjson
    from fastapi import FastAPI, Response
    
    app = FastAPI()
    
    
    class CustomORJSONResponse(Response):
        media_type = "application/json"
    
        def render(self, content: Any) -> bytes:
            assert orjson is not None, "orjson must be installed"
            return orjson.dumps(content, option=orjson.OPT_INDENT_2)
    
    
    @app.get("/", response_class=CustomORJSONResponse)
    async def main():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Sep 01 09:32:30 GMT 2022
    - 451 bytes
    - Viewed (0)
  5. docs/en/docs/reference/templating.md

    # Templating - `Jinja2Templates`
    
    You can use the `Jinja2Templates` class to render Jinja templates.
    
    Read more about it in the [FastAPI docs for Templates](https://fastapi.tiangolo.com/advanced/templates/).
    
    You can import it directly from `fastapi.templating`:
    
    ```python
    from fastapi.templating import Jinja2Templates
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 365 bytes
    - Viewed (0)
  6. .github/ISSUE_TEMPLATE/feature_enhancement_request.yaml

      - type: textarea
        attributes:
          label: API(s)
          description: Which existing classes or methods do you want to improve?
          placeholder: e.g., `com.google.common.collect.ImmutableList::of`
          render: java
        validations:
          required: true
    
      - type: textarea
        attributes:
          label: How do you want it to be improved?
        validations:
          required: true
    
      - type: textarea
        attributes:
    Others
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Nov 17 18:47:47 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  7. docs/en/docs/js/termynal.js

        addFinish() {
            const finish = this.generateFinish()
            this.container.appendChild(finish)
        }
    
        /**
         * Animate a typed line.
         * @param {Node} line - The line element to render.
         */
        async type(line) {
            const chars = [...line.textContent];
            line.textContent = '';
            this.container.appendChild(line);
    
            for (let char of chars) {
    JavaScript
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 9.3K bytes
    - Viewed (0)
  8. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/diagnostics/KtAbstractFirDiagnostic.kt

            get() = withValidityAssertion {
                val diagnostic = firDiagnostic as KtDiagnostic
    
                val firDiagnosticRenderer = RootDiagnosticRendererFactory(diagnostic)
                return firDiagnosticRenderer.render(diagnostic)
            }
    
        override val textRanges: Collection<TextRange>
            get() = withValidityAssertion { firDiagnostic.textRanges }
    
        @Suppress("UNCHECKED_CAST")
        override val psi: PSI
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Tue May 23 19:24:02 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  9. istioctl/pkg/tag/generate.go

    }
    
    // generateValidatingWebhook renders a validating webhook configuration from the given tagWebhookConfig.
    func generateValidatingWebhook(config *tagWebhookConfig, opts *GenerateOptions) (string, error) {
    	r := helm.NewHelmRenderer(opts.ManifestsPath, defaultChart, "Pilot", config.IstioNamespace, nil)
    
    	if err := r.Run(); err != nil {
    		return "", fmt.Errorf("failed running Helm renderer: %v", err)
    	}
    
    	values := fmt.Sprintf(`
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Jan 16 17:43:49 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  10. analysis/analysis-api-fir/analysis-api-fir-generator/src/org/jetbrains/kotlin/analysis/api/fir/generator/rendererrs/KtDiagnosticClassRenderer.kt

    import org.jetbrains.kotlin.analysis.api.fir.generator.printTypeWithShortNames
    import org.jetbrains.kotlin.utils.SmartPrinter
    
    object KtDiagnosticClassRenderer : AbstractDiagnosticsDataClassRenderer() {
        override fun SmartPrinter.render(diagnosticList: HLDiagnosticList, packageName: String) {
            printHeader(packageName, diagnosticList)
            printDiagnosticClasses(diagnosticList)
        }
    
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Tue Jul 18 11:49:20 GMT 2023
    - 2.4K bytes
    - Viewed (0)
Back to top