Add MusicGameResults model and score calculation logic in GameEndView
This commit is contained in:
parent
b1ec960dfa
commit
303538bf48
7 changed files with 116 additions and 18 deletions
|
@ -35,7 +35,11 @@
|
|||
</h2>
|
||||
{% if musikgame.over %}
|
||||
<ol class="podium">
|
||||
{% for player in musikgame.players.all %}<li>{{ player.username }}</li>{% endfor %}
|
||||
{% for player in musikgame.musicgameresults_set.all %}
|
||||
<li>
|
||||
{{ player.player.username }} <span class="score">{{ player.score }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% else %}
|
||||
<p>{{ musikgame.players.all|join:", " }}</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue