Make conferences a top-level list
This commit is contained in:
parent
b1139b79d2
commit
5786e3d575
|
@ -52,8 +52,5 @@ def get_list(filepath: str) -> list[Event]:
|
||||||
url=conf.url,
|
url=conf.url,
|
||||||
going=conf.going,
|
going=conf.going,
|
||||||
)
|
)
|
||||||
for conf in (
|
for conf in (Conference(**conf) for conf in yaml.safe_load(open(filepath, "r")))
|
||||||
Conference(**conf)
|
|
||||||
for conf in yaml.safe_load(open(filepath, "r"))["conferences"]
|
|
||||||
)
|
|
||||||
]
|
]
|
||||||
|
|
|
@ -110,7 +110,7 @@ def conference_list() -> str:
|
||||||
"""Page showing a list of conferences."""
|
"""Page showing a list of conferences."""
|
||||||
data_dir = app.config["PERSONAL_DATA"]
|
data_dir = app.config["PERSONAL_DATA"]
|
||||||
filepath = os.path.join(data_dir, "conferences.yaml")
|
filepath = os.path.join(data_dir, "conferences.yaml")
|
||||||
item_list = yaml.safe_load(open(filepath))["conferences"]
|
item_list = yaml.safe_load(open(filepath))
|
||||||
today = date.today()
|
today = date.today()
|
||||||
for conf in item_list:
|
for conf in item_list:
|
||||||
conf["start_date"] = as_date(conf["start"])
|
conf["start_date"] = as_date(conf["start"])
|
||||||
|
|
Loading…
Reference in a new issue