How to load jinja template directly from filesystem
Here’s how: use a FileSystemLoader instead of a PackageLoader. I found examples on the web here and here. Let’s say you have a python file in the same dir as your template: ./index.py ./template.html This index.py will find the template and render it: #!/usr/bin/python import jinja2 templateLoader = jinja2.FileSystemLoader(searchpath=”./”) templateEnv = jinja2.Environment(loader=templateLoader) TEMPLATE_FILE = “template.html” … Read more