Jinja2 templating form CLI
#jinja #templating #python #go #golang #github
- Python: https://github.com/kolypto/j2cli
- Go: https://github.com/wrouesnel/p2cli
#jinja #templating #python #go #golang #github
- Python: https://github.com/kolypto/j2cli
- Go: https://github.com/wrouesnel/p2cli
Jinja2 Tutorial
Text documents are the final result of rendering templates. Depending on the end consumer of these documents whitespace placement could be significant. One of the major niggles in Jinja2, in my opinion, is the way control statements and other elements affect whitespace output in the end documents.
To put it bluntly, mastering whitespaces in Jinja2 is the only way of making sure your templates generate text exactly the way you intended.
Now we know the importance of the problem, time to understand where it originates, to do that we’ll have a look at a lot of examples. Then we'll learn how we can control rendering whitespaces in Jinja2 templates.
- part1: Introduction and variable substitution
- part2: Loops and conditionals
- part3: Whitespace control
- part4: Template filters
- part5: Macros
- part6: Include and Import
- J2Live - Online Jinja2 Parser
#jinja #jinja2 #tutorial
Text documents are the final result of rendering templates. Depending on the end consumer of these documents whitespace placement could be significant. One of the major niggles in Jinja2, in my opinion, is the way control statements and other elements affect whitespace output in the end documents.
To put it bluntly, mastering whitespaces in Jinja2 is the only way of making sure your templates generate text exactly the way you intended.
Now we know the importance of the problem, time to understand where it originates, to do that we’ll have a look at a lot of examples. Then we'll learn how we can control rendering whitespaces in Jinja2 templates.
- part1: Introduction and variable substitution
- part2: Loops and conditionals
- part3: Whitespace control
- part4: Template filters
- part5: Macros
- part6: Include and Import
- J2Live - Online Jinja2 Parser
#jinja #jinja2 #tutorial
TTL255 - Przemek Rogala's blog
Jinja2 Tutorial - Part 1 - Introduction and variable substitution
First post in the Jinja tutorial series where I'll provide an overview of the language, discussion of its features and a healthy dose of example use cases. If you're new to the world of templating or simply need to refresh your memory, then you should found…