From 83915ebfa3f86f6ee383b99bd7e9614ae2a5bb53 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Tue, 8 Dec 2015 08:06:39 +0100 Subject: [PATCH] [enh] add jinja2 and load templates (allow overwridding) --- prosopopoee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/prosopopoee b/prosopopoee index 6cf23e7..c8f8073 100755 --- a/prosopopoee +++ b/prosopopoee @@ -5,6 +5,11 @@ import sys import yaml 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):