From aa1610f1b7c5517339569d924df4916405bf9cb7 Mon Sep 17 00:00:00 2001 From: luxick Date: Sat, 2 Mar 2019 17:10:39 +0100 Subject: [PATCH] Add player list. --- app.py | 5 ++-- templates/episode_details.html | 54 ++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 3dfa253..81a8461 100644 --- a/app.py +++ b/app.py @@ -188,9 +188,10 @@ def episode_detail(season_id: int, episode_id: int): episode = db.query_db(sql, args, one=True, cls=models.Episode) sql, args = db.load_episode_players(episode_id) ep_players = db.query_db(sql, args, cls=models.Player) - model = { - "title": f"{season.code}{episode.code}" + "title": f"{season.code}{episode.code}", + "episode": episode, + "players": ep_players } return render_template("episode_details.html", model=model) diff --git a/templates/episode_details.html b/templates/episode_details.html index a3e13b3..2f10b17 100644 --- a/templates/episode_details.html +++ b/templates/episode_details.html @@ -4,6 +4,60 @@ {% block content %}
+
+
+ + +
+
+ {{ model.episode.code }}: {{ model.episode.title }} +
+
+
+
+ + + +
+ + + +
+
+ Players in this episode +
+
+ + + + + + + + {% for player in model.players %} + + + + {% endfor %} + +
Name
{{ player.name }}
+
+
+ + + +
+ +
+
+
+ Events +
+
+
+
+
+
{% endblock %} \ No newline at end of file