Order solutions by problem number
This commit is contained in:
parent
1a83aa0388
commit
abafdc86d9
|
@ -165,6 +165,7 @@ class TeamDetailView(LoginRequiredMixin, DetailView):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
|
|
||||||
context["title"] = _("Information about team")
|
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()]
|
context["team_users_emails"] = [user.email for user in self.object.users.all()]
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
|
@ -125,7 +125,7 @@
|
||||||
{% if team.solutions.count %}
|
{% if team.solutions.count %}
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
<ul>
|
<ul>
|
||||||
{% for solution in team.solutions.all %}
|
{% for solution in ordered_solutions %}
|
||||||
<li><strong>{{ solution }} :</strong> <a data-turbolinks="false" href="{% url "document" file=solution.file %}">{% trans "Download" %}</a></li>
|
<li><strong>{{ solution }} :</strong> <a data-turbolinks="false" href="{% url "document" file=solution.file %}">{% trans "Download" %}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue