1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-21 03:18:27 +02:00

Update translations

This commit is contained in:
Yohann D'ANELLO
2020-05-11 14:21:55 +02:00
parent a561364bd0
commit 3b792a0548
4 changed files with 222 additions and 169 deletions

View File

@ -287,8 +287,12 @@ class Solution(Document):
unique_together = ('team', 'problem', 'final',)
def __str__(self):
return _("Solution of team {trigram} for problem {problem}")\
.format(trigram=self.team.trigram, problem=self.problem)
if self.final:
return _("Solution of team {trigram} for problem {problem} for final")\
.format(trigram=self.team.trigram, problem=self.problem)
else:
return _("Solution of team {trigram} for problem {problem}")\
.format(trigram=self.team.trigram, problem=self.problem)
class Synthesis(Document):

View File

@ -71,7 +71,7 @@ class UserDetailView(LoginRequiredMixin, DetailView):
"""
An administrator can log in through this page as someone else, and act as this other person.
"""
if "view_as" in request.POST and self.request.admin:
if "view_as" in request.POST and self.request.user.admin:
session = request.session
session["admin"] = request.user.pk
obj = self.get_object()