variable
variable and escape
{{ name }}{{ name|safe }}{% autoescape off %}
{{ name }}
{% endautoescape %}<script>
let name = "{{ name|escapejs }}"
</script>set variable
{% set new_var = "hello" %}
{{ new_var }}use `with` to set variable
Last updated