This repository is organized in seven levels, to help everyone to understand how to use Jinja, from a young ninja (Jenin) to a master ninja (Jonin).
0 - Jenin
This repository shows simple esamples to better understand how to use basic commands with Jinja.
1 - Variables
Template variables are defined by the context dictionary passed to the template.
You can mess around with the variables in templates provided, they are passed in by the application. Variables may have attributes or elements on them you can access too. What attributes a variable has depends heavily on the application providing that variable.
2 - Statements
{% ... %} for Statements
A control structure refers to all those things that control the flow of a program - conditionals (i.e. if/elif/else), for-loops, as well as things like macros and blocks. With the default syntax, control structures appear inside {% ... %} blocks.
3 - Expressions
{{ ... }} for Expressions to print to the template output
Jinja allows basic expressions everywhere. Theese work very similarly to regular Python; even if you’re not working with Python you should feel comfortable with it.
4 - Macros
Macros are function-link elements.
5 - Custom filter
You can create new filters yourself!
6 - Jonin
Now you're a Jinja Ninja!
Thanks to