Top "Jinja2" questions

Jinja2 is a fast template engine for Python.

Rendering newlines in user-submitted content (Python web app)

I have a web.py app that takes input from a textarea and inputs it to a database. I can …

python html jinja2 web.py
How to add Conditional CSS class based on Python If statement

How do you add a conditional CSS class based on a Python if statement in the following example to show …

python jinja2 webapp2
Stop jupyter notebook wrapping cell contents in pandas html table output

The pandas option max_colwidth controls how many characters will be included in the repr of a dataframe: import string, …

html pandas jinja2 jupyter-notebook nbconvert
How to raise an exception in a Jinja2 macro?

I have a macro that is used to build a local repository using debmirror. Here's the snippet of code: {%- …

python jinja2 salt-stack
Display image stored as binary blob in template

I have a model with an image stored as a binary blob. I want to display this image, along with …

python google-app-engine flask jinja2 flask-restful
Ansible concat default variable and literal string

I'm not able to do a very simple thing. In my task I'm trying to concat two default variables with …

ansible yaml jinja2 ansible-template
How can I take a list of server names and append a resource URI and port to each?

I merged two lists from an Ansible inventory: set_fact: fact1: "{{ groups['group1'] + groups[group2']|list }} The output …

ansible jinja2 ansible-template
Ansible un-vault and template a file

I have a file on my local machine that I want to upload to a remote server, it contains confidential …

templates ansible jinja2 ansible-playbook ansible-vault
How to use omit with Ansible and avoid any errors?

I tried to use omit with an expression like this: id: "{{ openstack_networks.id | default(omit) }}" But it seems that …

ansible jinja2 ansible-2.x