Skip to content Skip to sidebar Skip to footer
Showing posts with the label Jinja2

Adding Jinja Template Dynamically

I have a jinja template that is the only content inside a set of div tags. {% include 'tem… Read more Adding Jinja Template Dynamically

How To Make Tojson() Filter In Jinja2 Output Unicode Instead Of Escape Sequences?

My template is used for JS let SETTINGS = {{settings|tojson(4)}}; My settings is a dict {'name… Read more How To Make Tojson() Filter In Jinja2 Output Unicode Instead Of Escape Sequences?

Minify Javascript Code Containing Jinja2 Expressions With The Closure Compiler

I pass a JSON-encoded dictionary from Python 3 to Jinja2 template and assign it to a JavaScript var… Read more Minify Javascript Code Containing Jinja2 Expressions With The Closure Compiler

Why Is It Dangerous To Render User-generated HTML Or Javascript?

I don't know if this is really dangerous, but, as Google does it with its HTML and Javascript s… Read more Why Is It Dangerous To Render User-generated HTML Or Javascript?