{% extends "base.html" %} {% block title %}Deck - {{ deck.name }}{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block content %}

This is the page for deck {{ deck.name }} with id {{ deck.id }}, owned by {{ owner.name }}

{% if deck.description %}

The description of the deck is: {{ deck.description }}

{% endif %}

Game history

{% if game_history %} (TODO - extract a translation-from-deckid-to-names method) (Or...just link them as a relationship/ForeignKey) {% for entry in game_history %} {% endfor %}
Date Participants Result ELO Score
{{ entry.game.date.strftime('%Y-%m-%d') }} {% for participant_id in range(6) %} {% set deck_id = entry.game['deck_id_' ~ (participant_id+1)] %} {% if deck_id is not none %} {{ deck_id }} {% endif %} {% endfor %} {{ "Win" if entry.game.winning_deck_id == deck.id else "Loss" }} {{ entry.score|int }}
{% else %}

This Deck has not played any games

{% endif %} {% endblock %}