Browse Source

renaming the wrapping-templates folder

master
manetta 3 years ago
parent
commit
5b7508ce9b
  1. 0
      web-interface/templates/wrapping-templates/template.html
  2. 0
      web-interface/templates/wrapping-templates/template.inspect.html
  3. 6
      web-interface/update.py

0
web-interface/templates/local/template.html → web-interface/templates/wrapping-templates/template.html

0
web-interface/templates/local/template.inspect.html → web-interface/templates/wrapping-templates/template.inspect.html

6
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)

Loading…
Cancel
Save