diff --git a/confarchive/model.py b/confarchive/model.py index 6fc4561..70394cf 100644 --- a/confarchive/model.py +++ b/confarchive/model.py @@ -37,7 +37,11 @@ class Series(TimeStampedModel): slug = Column(String, unique=True) wikidata_qid = Column(String, unique=True) - conferences = relationship("Conference", back_populates="series") + conferences = relationship( + "Conference", + order_by="Conference.start", + back_populates="series", + ) class Conference(TimeStampedModel): diff --git a/main.py b/main.py index c85ec45..0f7a1ad 100755 --- a/main.py +++ b/main.py @@ -269,6 +269,14 @@ order by num return database.session.execute(sql) +@app.route("/series") +def list_series() -> str: + """Page showing list of conference series.""" + items = model.Series.query + + return flask.render_template("series/list.html", items=items) + + @app.route("/speakers") def top_speakers_page() -> str: top = top_speakers() diff --git a/templates/navbar.html b/templates/navbar.html index 600cde8..0b740f3 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -2,6 +2,7 @@