Avoiding ambiguous mustaches from Jinja2 that includes jQuery templates

前端 未结 2 1591
情书的邮戳
情书的邮戳 2021-01-31 03:24

I\'m trying to insert jQuery templates into Jinja2 templates. Alas they both (in the default setup) use the mustaches {{ & }} to indicate expressio

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-31 04:13

    You can use the {% raw %}{% endraw %} construct to ease your escaping woes (straight from the Jinja2 docs).

    Example:

    
    

提交回复
热议问题