[enh] add jinja2 and load templates (allow overwridding)

This commit is contained in:
Laurent Peuch 2015-12-08 08:06:39 +01:00
parent 3bc95c0a85
commit 83915ebfa3

View File

@ -5,6 +5,11 @@ import sys
import yaml import yaml
from dateutil.parser import parse from dateutil.parser import parse
from jinja2 import Environment, FileSystemLoader
templates = Environment(loader=FileSystemLoader([os.path.realpath(os.path.join(os.getcwd(), "templates")), os.path.join(os.path.split(os.path.realpath(__file__))[0], "templates")]))
index_template = templates.get_template("index.html")
gallery_index_template = templates.get_template("gallery-index.html")
def error(test, error_message): def error(test, error_message):