Load templates in prep.py instead of old pages
This commit is contained in:
4
prep.py
4
prep.py
@@ -141,7 +141,7 @@ for key, value_pair in TYPES_DICT.items():
|
||||
|
||||
# Build Serbian Events page
|
||||
new_events_html = build_html(new_events, DAYS_SR, sr_types)
|
||||
with open("pages/sr/events.html", "r") as file:
|
||||
with open("template/events-sr.html", "r") as file:
|
||||
page_template = ([line for line in file])
|
||||
|
||||
with open("pages/sr/events.html", "w") as file:
|
||||
@@ -149,7 +149,7 @@ with open("pages/sr/events.html", "w") as file:
|
||||
|
||||
# Build English Events page
|
||||
new_events_html = build_html(new_events, DAYS_EN, en_types)
|
||||
with open("pages/en/events.html", "r") as file:
|
||||
with open("template/events-en.html", "r") as file:
|
||||
page_template = ([line for line in file])
|
||||
|
||||
with open("pages/en/events.html", "w") as file:
|
||||
|
Reference in New Issue
Block a user