from jinja2 import Environment def environment(**options): env = Environment(**options) env.globals.update({ # "url": reverse_url, }) return env