Top "Jinja2" questions

Jinja2 is a fast template engine for Python.

jinja2 how to remove trailing newline

I'm using jinja 2 to output a yaml file but can't seem to get rid of a trailing newline and the …

python yaml jinja2 newline
Jinja2: Change the value of a variable inside a loop

I want to change the value of the variable declared outside the loop within a loop. But always changing, it …

python jinja2
How to get the first element of a list from the output of setup module in Ansible?

I received the following data from the setup module: "ansible_nodename": "3d734bc2a391", "ansible_os_family": "RedHat", "ansible_pkg_…

ansible jinja2 ansible-facts ansible-template
Python - 'ascii' codec can't decode byte

I'm using Python 2.6 and Jinja2 to create HTML reports. I provide the template with many results and the template loops …

python jinja2
Escape jinja2 syntax in a jinja2 template

I serve dynamic pages from Jinja2 templates in Flask. Now I am defining client-side templates in say, Jinja2-clone Nunjucks …

flask jinja2
How to use g.user global in flask

As I understand the g variable in Flask, it should provide me with a global place to stash data like …

python flask jinja2 flask-login
jinja2 - how to put a block in an if statement?

I am trying to use an if to determine which block should fill my {% block content %}. I have a base.…

python python-2.7 if-statement flask jinja2
Ansible: Get all the IP addresses of a group

Let's imagine an inventory file like this: node-01 ansible_ssh_host=192.168.100.101 node-02 ansible_ssh_host=192.168.100.102 node-03 ansible_ssh_host=192.168.100.103 node-04 …

ansible jinja2 ansible-playbook
Why doesn't my condition logic work as expected in Jinja2/CherryPy?

{% if bCat2 == True %} <div>True</div> {% else %} <div>False</div> Returns <…

cherrypy jinja2
How to use float filter to show just two digits after decimal point?

I am using Flask/Jinja2 template to show a number using |float filter. Here is my code {% set proc_err = …

flask wsgi jinja2