Top "Jinja2" questions

Jinja2 is a fast template engine for Python.

'if' statement in jinja2 template

I'm trying to write an if statement in jinja template {% for key in data %} {% if key is 'priority' %} <p&…

python templates jinja2
Call a python function from jinja2

I am using jinja2, and I want to call a python function as a helper, using a similar syntax as …

python jinja2
String concatenation in Jinja

I just want to loop through an existing list and make a comma delimited string out of it. Something like …

string jinja2
Split string into list in jinja?

I have some variables in a jinja2 template which are strings seperated by a ';'. I need to use …

python jinja2
How to write dynamic variable in Ansible playbook

Based on extra vars parameter I Need to write variable value in ansible playbook ansible-playbook playbook.yml -e "param1=value1 …

jinja2 ansible ansible-playbook
How to increment a variable on a for loop in jinja template?

I would like to do something like: variable p is from test.py which is a list ['a','b','c',…

python jinja2
Convert integer to string Jinja

I have an integer {% set curYear = 2013 %} In {% if %} statement I have to compare it with some string. I can't set …

python jinja2 nunjucks
How to output a comma delimited list in jinja python template?

If I have a list of users say ["Sam", "Bob", "Joe"], I want to do something where I can output …

python jinja2
jinja2.exceptions.TemplateNotFound error

i use flask and i got this error when i call this url: /login Here's my login method: @app.route(…

python flask jinja2
Passing HTML to template using Flask/Jinja2

I'm building an admin for Flask and SQLAlchemy, and I want to pass the HTML for the different inputs to …

python jinja2 flask