From 6337e02d9dd8c7be92ffa168f67ab0de651664d0 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 30 Jan 2017 20:41:18 +0100 Subject: use templates instead of SSI, use relative URLs --- template.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'template.py') diff --git a/template.py b/template.py index 86516bb6..aab6fddd 100755 --- a/template.py +++ b/template.py @@ -23,7 +23,12 @@ env.install_gettext_translations(tr, newstyle=True) tmpl = env.get_template(in_file) +def url(x): + # TODO: look at the app root environment variable + # TODO: check if file exists + return x + import codecs f = codecs.open(out_file, "w", "utf-8") -f.write(tmpl.render()) +f.write(tmpl.render(lang=locale, url=url)) f.close() -- cgit v1.2.3