chore: planning 0.10

This commit is contained in:
mco-system 2023-04-19 21:18:27 +11:00
parent f6decb14ed
commit 4435f33e0b
2 changed files with 18 additions and 18 deletions

View File

@ -27,7 +27,7 @@ pretalx:
apiprefix: api
apikey: bb770a53b15467dfb67c03d178004aca9e4819d6
event: thsf-2023
schedule: 0.10
schedule: wip
navbar:
items:
- name: Home

View File

@ -117,12 +117,12 @@ def index():
@app.route('/planning', methods=['GET'])
def planning():
slots = get_slots()
for slot in slots["slots"]:
for speaker in slot["speakers"]:
speaker["biography"] = get_speaker_biography(speaker["name"])
for slot in slots.get("slots"):
for speaker in slot.get("speakers"):
speaker["biography"] = get_speaker_biography(speaker.get("name"))
return render_template("planning.html",
slots=sorted(slots["slots"],
key=lambda slot: slot["slot"]["start"]),
slots=sorted(slots.get("slots"),
key=lambda slot: slot.get("slot").get("start")),
navbar=navbar.get_from_page(page="/planning"))
@app.route('/place', methods=['GET'])
@ -144,8 +144,8 @@ def goodies():
def concerts():
slots = get_slots()
return render_template("planning.html",
slots=sorted(slots["slots"],
key=lambda slot: slot["slot"]["start"]),
slots=sorted(slots.get("slots"),
key=lambda slot: slot.get("slot").get("start")),
navbar=navbar.get_from_page(page="/concerts"),
filter=["concert", "dj set"])
@ -153,8 +153,8 @@ def concerts():
def workshops():
slots = get_slots()
return render_template("planning.html",
slots=sorted(slots["slots"],
key=lambda slot: slot["slot"]["start"]),
slots=sorted(slots.get("slots"),
key=lambda slot: slot.get("slot").get("start")),
navbar=navbar.get_from_page(page="/workshops"),
filter=["workshop"])
@ -162,8 +162,8 @@ def workshops():
def screenings():
slots = get_slots()
return render_template("planning.html",
slots=sorted(slots["slots"],
key=lambda slot: slot["slot"]["start"]),
slots=sorted(slots.get("slots"),
key=lambda slot: slot.get("slot").get("start")),
navbar=navbar.get_from_page(page="/screenings"),
filter=["screening"])
@ -171,8 +171,8 @@ def screenings():
def discussions():
slots = get_slots()
return render_template("planning.html",
slots=sorted(slots["slots"],
key=lambda slot: slot["slot"]["start"]),
slots=sorted(slots.get("slots"),
key=lambda slot: slot.get("slot").get("start")),
navbar=navbar.get_from_page(page="/discussions"),
filter=["panel discussion"])
@ -180,8 +180,8 @@ def discussions():
def exhibitions():
slots = get_slots()
return render_template("planning.html",
slots=sorted(slots["slots"],
key=lambda slot: slot["slot"]["start"]),
slots=sorted(slots.get("slots"),
key=lambda slot: slot.get("slot").get("start")),
navbar=navbar.get_from_page(page="/exhibitions"),
filter=["exhibition"])
@ -189,8 +189,8 @@ def exhibitions():
def talks():
slots = get_slots()
return render_template("planning.html",
slots=sorted(slots["slots"],
key=lambda slot: slot["slot"]["start"]),
slots=sorted(slots.get("slots"),
key=lambda slot: slot.get("slot").get("start")),
navbar=navbar.get_from_page(page="/talks"),
filter=["talk", "light talk"])