From abafdc86d930ee2547befc389501cf23d8b7c94b Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Wed, 6 May 2020 14:50:07 +0200 Subject: [PATCH] Order solutions by problem number --- apps/tournament/views.py | 1 + templates/tournament/team_detail.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/tournament/views.py b/apps/tournament/views.py index db5294b..6d36a74 100644 --- a/apps/tournament/views.py +++ b/apps/tournament/views.py @@ -165,6 +165,7 @@ class TeamDetailView(LoginRequiredMixin, DetailView): context = super().get_context_data(**kwargs) context["title"] = _("Information about team") + context["ordered_solutions"] = self.object.solutions.order_by('problem').all() context["team_users_emails"] = [user.email for user in self.object.users.all()] return context diff --git a/templates/tournament/team_detail.html b/templates/tournament/team_detail.html index 072a30b..cc7b19d 100644 --- a/templates/tournament/team_detail.html +++ b/templates/tournament/team_detail.html @@ -125,7 +125,7 @@ {% if team.solutions.count %}