Top "Jinja2" questions

Jinja2 is a fast template engine for Python.

How to render by Vue instead of Jinja

<template id="task-template"> <h1>My Tasks</h1> <tasks-app></tasks-app> <…

python html flask vue.js jinja2
Insert javascript at top of including file in Jinja 2

In Jinja2, I would like the following to work as it looks like it should, by running: from jinja2 import …

python templates mako jinja2 genshi
ansible conditional templates

I want to have a simple if else condition in ansibles jinja templates. For plain python cluster_name+'A' if …

python ansible jinja2 ansible-2.x ansible-template
Jinja keep indentation on include or macro

I am wondering if there is any way to keep the indentation with jinja when adding a include or macro …

templates jinja2
zip(list1, list2) in Jinja2?

I'm doing code generation in Jinja2 and I frequently want to iterate through two lists together (i.e. variables names …

python code-generation jinja2
Modifying dictionary attributes in jinja2

Suppose I pass a dictionary to my jinja2 template. In the view I have something like d = {} #set other template …

python dictionary pyramid jinja2
How to remove or exclude an item in an Ansible template list?

I'm writing an Ansible template that needs to produce a list of ip's in a host group, excluding the current …

ansible jinja2 ansible-template
Ansible - how to evaluate role_path variable

I'm trying to evaluate the value of the role_path variable in order to use it in other roles as …

path ansible jinja2 ansible-2.x
Jinja2: How to use named blocks inside included templates, inside extendable template

I am having the Issue with Jinja2 Extend and Import. base_admin.html <html> <body> <…

python inheritance include jinja2 extend
Jinja variables within the Flask url_for function

I have tried multiple different things, but cannot get the URL to appear as /item like I want it to. …

variables flask convention jinja2 url-for