I would like to know how can I set a variable with another variable in jinja. I will explain, I have got a submenu and I would like show which link is active. I tried this:
{% set active_link = {{recordtype}} …
How do I get the number of elements in a list in jinja2 template?
For example, in Python:
print(template.render(products=[???]))
and in jinja2
<span>You have {{what goes here?}} products</span>
I am trying to set the text color using css in a jinja2 template. In the following code I want to set the output string to print in a specific font color if the variable contains a string. Everytime the …