Modified method for importing sources in Jinja templates