Top "Jinja2" questions

Jinja2 is a fast template engine for Python.

Python - What is the process to create pdf reports with charts from a DB?

I have a database generated by a survey to evaluate university professors. What I want is a python script that …

python pandas matplotlib jinja2 plotly
Is there a direct approach to format numbers in jinja2?

I need to format decimal numbers in jinja2. When I need to format dates, I call the strftime() method in …

python google-app-engine jinja2
How to make a for loop in Jinja?

I want to make a for-loop that goes from 0 to 10 in Jinja. How do I do it? All I know …

jinja2
Ansible Jinja2 string comparison

I am getting value of variable "env" in Jinja2 template file using a variable defined in group_vars like: env: "{{ …

ansible jinja2 ansible-template
how to append to a list in jinja2 for ansible

Below is the jinja2 template that i wrote to use in ansible. {% set port = 1234 %} {% set server_ip = [] %} {% for ip in …

templates ansible jinja2 ansible-template
how to use Flask Jinja2 url_for with multiple parameters

I have a problem while using jinja2 url_for() function. I have a route like this: @app.route('/article/&…

python flask jinja2 url-for
How can I break a for loop in jinja2?

How can I break out of a for loop in jinja2? my code is like this: <a href="#"> {% …

python for-loop jinja2
How to pass selected, named arguments to Jinja2's include context?

Using Django templating engine I can include another partial template while setting a custom context using named arguments, like this: {% …

templates jinja2
How can I test jinja2 templates in ansible?

Sometimes I need to test some jinja2 templates that I use in my ansible roles. What is the simplest way …

ansible jinja2 ansible-playbook ansible-template
Conditional substring in a Jinja2 template

When deploying with ansible, There's 1 specific case where I need to strip a string of a trailing -p substring. The …

substring ansible jinja2