Adding Extensions
Extensions are added to the Jinja2 environment at creation time. Once theenvironment is created additional extensions cannot be added. To add anextension pass a list of extension classes or import paths to theextensions parameter of the Environment
constructor. The followingexample creates a Jinja2 environment with the i18n extension loaded:
jinja_env = Environment(extensions=['jinja2.ext.i18n'])