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)