From 5b7508ce9b97e7c0c0afda99ef3c2685ca9b2b07 Mon Sep 17 00:00:00 2001 From: manetta Date: Wed, 1 Sep 2021 13:06:47 +0200 Subject: [PATCH] renaming the wrapping-templates folder --- .../templates/{local => wrapping-templates}/template.html | 0 .../{local => wrapping-templates}/template.inspect.html | 0 web-interface/update.py | 6 ++++-- 3 files changed, 4 insertions(+), 2 deletions(-) rename web-interface/templates/{local => wrapping-templates}/template.html (100%) rename web-interface/templates/{local => wrapping-templates}/template.inspect.html (100%) diff --git a/web-interface/templates/local/template.html b/web-interface/templates/wrapping-templates/template.html similarity index 100% rename from web-interface/templates/local/template.html rename to web-interface/templates/wrapping-templates/template.html diff --git a/web-interface/templates/local/template.inspect.html b/web-interface/templates/wrapping-templates/template.inspect.html similarity index 100% rename from web-interface/templates/local/template.inspect.html rename to web-interface/templates/wrapping-templates/template.inspect.html diff --git a/web-interface/update.py b/web-interface/update.py index 7614394..d28c7f2 100644 --- a/web-interface/update.py +++ b/web-interface/update.py @@ -4,7 +4,9 @@ import re import json import jinja2 + STATIC_FOLDER_PATH = './static' # without trailing slash +WRAPPING_TEMPLATES_DIR = './wrapping-templates' def API_request(url, pagename): """ @@ -113,7 +115,7 @@ def save(html, pagename, publication_unfolded): if html: # save final page that will be used with PagedJS - template_file = open(f'{ STATIC_FOLDER_PATH }/local/template.html').read() + template_file = open(f'{ STATIC_FOLDER_PATH }/{ WRAPPING_TEMPLATES_DIR }/template.html').read() template = jinja2.Template(template_file) html = template.render(publication_unfolded=publication_unfolded, title=pagename) @@ -124,7 +126,7 @@ def save(html, pagename, publication_unfolded): out.close() # save extra html page for debugging - template_file = open(f'{ STATIC_FOLDER_PATH }/local/template.inspect.html').read() + template_file = open(f'{ STATIC_FOLDER_PATH }/{ WRAPPING_TEMPLATES_DIR }/template.inspect.html').read() template = jinja2.Template(template_file) html = template.render(publication_unfolded=publication_unfolded, title=pagename)