Top "Jinja2" questions

Jinja2 is a fast template engine for Python.

Suppress "None" output as string in Jinja2

How do I persuade Jinja2 to not print "None" when the value is None? I have a number of entries …

python jinja2
What is the fastest template system for Python?

Jinja2 and Mako are both apparently pretty fast. How do these compare to (the less featured but probably good enough …

python django-templates template-engine mako jinja2
Jinja2 filter list using string contains test

I'm trying to filter a list in ansible in Jinja2 when the elements contain a string, but the Jinja documentation …

jinja2 ansible ansible-2.x
Django: Switching to Jinja2?

I've got a couple small (500 or 600 lines of template code) Django sites, and I'd like to migrate them to using …

django django-templates jinja2
How can I send variables to Jinja template from a Flask decorator?

Many routes around my blueprinted flask app will need to send 'sidebar data' to jinja. I'm looking for the most …

python templates flask decorator jinja2
Ansible template adds 'u' to array in template

I have the following vars inside of my ansible playbook I got the following structure domains: - { main: 'local1.com', …

ansible jinja2 ansible-2.x ansible-template
Jinja2 round filter not rounding

I have the following code in my template: data: [{% for deet in deets %} {{ deet.value*100|round(1) }}{% if not loop.last %},{% …

python flask jinja2 template-engine
How to get list of all variables in jinja 2 templates

I am trying to get list of all variables and blocks in a template. I don't want to create my …

jinja2
Is there an idiomatic file extension for Jinja templates?

I need to programatically distinguish between Jinja template files, other template files (such as ERB), and template-less plain text files. …

python templates file-extension jinja2
Airflow using template files for PythonOperator

The method of getting a BashOperator or SqlOperator to pick up an external file for its template is somewhat clearly …

python jinja2 airflow