Answers for "jinja2 include template with variables"

1

how to declare and retrieve variable in jinja template

{% with my_variable="my value" %}
{{my_variable}}
{% endwith %}

{# or #}

{% firstof "my value" as my_variable %}
{{my_variable}}
Posted by: Guest on June-18-2020
0

jinja2 include template

{% include "to_be_included.html" with context %}
Posted by: Guest on July-02-2020

Code answers related to "jinja2 include template with variables"

Browse Popular Code Answers by Language