forked from Decentrala/website
fix issue with using same name for two different variables
This commit is contained in:
parent
d878e884d4
commit
9fa68a27b6
6
prep.py
6
prep.py
@ -70,7 +70,7 @@ events = load_events()
|
|||||||
events = sort_events(events)
|
events = sort_events(events)
|
||||||
write_events(events)
|
write_events(events)
|
||||||
|
|
||||||
events = []
|
newevents = []
|
||||||
|
|
||||||
for event in events:
|
for event in events:
|
||||||
date, time, location, title = event.split(", ")
|
date, time, location, title = event.split(", ")
|
||||||
@ -88,11 +88,11 @@ for event in events:
|
|||||||
else:
|
else:
|
||||||
future_event.append("<td> "+location.strip()+" </td>")
|
future_event.append("<td> "+location.strip()+" </td>")
|
||||||
future_event.append("<td> "+title+" </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:
|
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(["<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>"])
|
file.writelines(["</table>"])
|
||||||
|
|
||||||
#with open("pages/en/events.html","wt") as file:
|
#with open("pages/en/events.html","wt") as file:
|
||||||
|
Loading…
Reference in New Issue
Block a user