Top "Jinja2" questions

Jinja2 is a fast template engine for Python.

Test Flask render_template() context

I have a Flask route that looks like this: @app.route('/') def home(): return render_template( 'home.html', …

python flask jinja2
Appending files with Template Module in Ansible

So I have an ansible playbook that is using a Jinja2 template to create a log file. Everytime I run …

ansible jinja2 templating
Jinja-like JS templating language

I really like django/jinja2 templating languages. Their syntax is extremely simple and yet is highly versatile. Is there anything …

javascript jquery jinja2 template-engine language-comparisons
Jinja2: Render template inheritance?

I'd like to render a fused Jinja2 and Markdown page using a template, which looks like so: {% block title %}{{ title }}{% …

python extend jinja2
*args, **kwargs in jinja2 macros

How are extra args & kwargs handled for a Jinja2 macro? The documentation isn't exactly clear offhand. For example, this …

python macros jinja2
Accessing nested YAML mappings with jinja2

I've recently started using YAML and jinja2. I'm having trouble understanding why I need to reference the entire structure of …

python yaml jinja2 pyyaml
How to populate my WTForm variables?

I'm enabling a function that can edit an entity. I want to populate the form with the variables from the …

python google-app-engine jinja2 wtforms
Jinja docx template, avoiding new line in nested for

I was wondering if there is a way to avoid newline characters inside a for in a docx template with …

python jinja2 docx
Ansible loop - how to match up template values with with_items?

I'm trying to create files that have values that match their with_items values. I have a var list like …

ansible jinja2 ansible-template
Use Jinja2 template engine in external javascript file

I working on a web project using Python and Flask. I was just wondering if I can access parameters sent …

javascript python flask external jinja2