parent
87009c2247
commit
187214cfa1
4 changed files with 114 additions and 26 deletions
25
web_view.py
Executable file
25
web_view.py
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/python3
|
||||
"""When conference websites appeared."""
|
||||
|
||||
import flask
|
||||
|
||||
from conference import LiveConference, load_yaml
|
||||
|
||||
app = flask.Flask(__name__)
|
||||
app.debug = False
|
||||
|
||||
|
||||
@app.route("/")
|
||||
async def index() -> str:
|
||||
"""Index page."""
|
||||
conferences = load_yaml("conferences")
|
||||
live: list[LiveConference] = load_yaml("live")
|
||||
|
||||
for c in live:
|
||||
c["url"] = conferences[c["conference"]].format(year=c["year"])
|
||||
|
||||
return flask.render_template("index.html", live=live, conferences=conferences)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host="0.0.0.0")
|
||||
Loading…
Add table
Add a link
Reference in a new issue