Top "Jinja2" questions

Jinja2 is a fast template engine for Python.

Macros in the Airflow Python operator

Can I use macros with the PythonOperator? I tried following, but I was unable to get the macros rendered: dag = …

jinja2 airflow
how to get static files in Flask without url_for('static', file_name='xxx')

I don't want use url_for('static', file_name='foo.jpg') to get static file in template. how to get …

python flask jinja2 static-files
How do I access session data in Jinja2 templates (Bottle framework on app engine)?

I'm running the micro framework Bottle on Google App Engine. I'm using Jinja2 for my templates. And I'm using Beaker …

python google-app-engine session jinja2 beaker
How to pluralize a name in a template with jinja2?

If I have a template variable called num_countries, to pluralize with Django I could just write something like this: …

python templates jinja2 pluralize
Insert the folium maps into the jinja template

I want to insert follium map into the jinja template. run.py from flask import Flask, render_template app = Flask(__…

python html flask jinja2 folium
Ansible template module not parsing with_items variable

I am using a simple template with only variables in it. This is how my task looks like in my …

ansible jinja2 ansible-template
Is there a way to control the width of wtf.form_field input fields without affecting the label width?

I am currently rendering several Flask fields (SelectFields, InputFields) using the following jinja2 template: <div>{{ wtf.form_field(…

flask jinja2 wtforms flask-wtforms
Flask-Admin extending templates

I'm trying to extend my template with 'master.html' template of Flask-Admin like this: {% extends 'admin/master.html' %} {% block body %} …

python flask jinja2 flask-admin
Jinja2/Python insert a image(s) into html

I am just looking into using Jinja2 with a python application I have already written. I may be going about …

python jinja2 weasyprint
Avoiding ambiguous mustaches from Jinja2 that includes jQuery templates

I'm trying to insert jQuery templates into Jinja2 templates. Alas they both (in the default setup) use the mustaches {{ & }} …

jquery jinja2 jquery-templates