forked from Decentrala/website
fix issue with using same name for two different variables
This commit is contained in:
parent
d878e884d4
commit
9fa68a27b6
8
prep.py
8
prep.py
@ -70,7 +70,7 @@ events = load_events()
|
||||
events = sort_events(events)
|
||||
write_events(events)
|
||||
|
||||
events = []
|
||||
newevents = []
|
||||
|
||||
for event in events:
|
||||
date, time, location, title = event.split(", ")
|
||||
@ -88,14 +88,14 @@ for event in events:
|
||||
else:
|
||||
future_event.append("<td> "+location.strip()+" </td>")
|
||||
future_event.append("<td> "+title+" </td>")
|
||||
events.append("<tr>\n"+"\n".join(future_event)+"\n</tr>")
|
||||
newevents.append("<tr>\n"+"\n".join(future_event)+"\n</tr>")
|
||||
|
||||
with open("pages/sr/events.html","wt") as file:
|
||||
file.writelines(["<h1>Događaji</h1>\n", "<table>\n", "<tr><th>Datum</th><th>Vreme</th><th>Mesto</th><th>Tema</th></tr>\n"])
|
||||
file.writelines(events)
|
||||
file.writelines(newevents)
|
||||
file.writelines(["</table>"])
|
||||
|
||||
#with open("pages/en/events.html","wt") as file:
|
||||
# file.writelines(["<h1>Events</h1>", "<table>", "<tr>\n<th>Date</th>\n<th>Time</th>\n<th>Place</th>\n<th>Theme</th>\n</tr>"])
|
||||
# file.writelines(events)
|
||||
# file.writelines(["</table>"])
|
||||
# file.writelines(["</table>"])
|
||||
|
Loading…
Reference in New Issue
Block a user