zip(list1, list2) in Jinja2?

Modify the jinja2.Environment global namespace itself if you see fit.

import jinja2
env = jinja2.Environment()
env.globals.update(zip=zip)
# use env to load template(s)

This may be helpful in separating view (template) logic from application logic, but it enables the reverse as well. #separationofconcerns

Leave a Comment