diff --git a/game/templates/game/group_detail.html b/game/templates/game/group_detail.html index 19b4121..6db239b 100644 --- a/game/templates/game/group_detail.html +++ b/game/templates/game/group_detail.html @@ -18,7 +18,7 @@ Effacer la blacklist

{% endif %} - {% if group.musikgame_set %} + {% if group.musikgame_set.exists %}

Parties

diff --git a/game/templates/game/musikgame_detail.html b/game/templates/game/musikgame_detail.html index 91674ef..9a673ca 100644 --- a/game/templates/game/musikgame_detail.html +++ b/game/templates/game/musikgame_detail.html @@ -24,4 +24,38 @@ {% endfor %} +

+ Résultats +

+
+ + Résultats + + + + + + + + + + + {% for music in musikgame.musicgameorder_set.all %} + + + + + + {% endfor %} + +
+ + + Musique + + Joueur +
{{ music.order }} + {{ music.music_video.title }} + {{ music.player }}
+
{% endblock content %} diff --git a/game/views.py b/game/views.py index 84b99cd..312e051 100644 --- a/game/views.py +++ b/game/views.py @@ -170,7 +170,7 @@ class GameCreateView(LoginRequiredMixin, CreateView): pm_list = list(zip(players, musics)) random.shuffle(pm_list) - for (player, music), order in zip(pm_list, range(len(pm_list))): + for (player, music), order in zip(pm_list, range(1, len(pm_list) + 1)): music.blacklisted = True music.save() models.MusicGameOrder.objects.create(