genshi

Insert javascript at top of including file in Jinja 2

Insert javascript at top of including file in Jinja 2 Question: In Jinja2, I would like the following to work as it looks like it should, by running: from jinja2 import Environment, FileSystemLoader env = Environment(loader=FileSystemLoader(‘.’)) template = env.get_template(‘x.html’) print template.render() Essentially the objective is to coalesce all the javascript into the <head> tags by …

Total answers: 5