Sunday 15 July 2012

google app engine - Can't disable the autoescape in jinja2 -


In GE, I use Geneji 2 with autospection, and everything works fine.

  import jinja2 Jinja_env = jinja2.Environment (loader = jinja2.FileSystemLoader (template_dir), autoescape = true)   

In a template I do not want autoscope, So I tried to disable it like this:

  {% autoescape false%} {{content}} {% endautoescape%}   

When it It's time to render this template so I encountered the message unknown tags 'autoescape'.

Try it out:

  {{content | Safe}}   

docs:



No comments:

Post a Comment