mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 12:38:26 +02:00
Display datetimes with local timezone
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -14,6 +14,7 @@ from django.utils.crypto import get_random_string
|
||||
from django.utils.encoding import force_bytes
|
||||
from django.utils.http import urlsafe_base64_encode
|
||||
from django.utils.text import format_lazy
|
||||
from django.utils.timezone import localtime
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from phonenumber_field.modelfields import PhoneNumberField
|
||||
from polymorphic.models import PolymorphicModel
|
||||
@ -471,7 +472,7 @@ class VolunteerRegistration(Registration):
|
||||
text = _("Registrations for tournament {tournament} are closing on {date:%Y-%m-%d %H:%M}. "
|
||||
"There are for now {validated_teams} validated teams (+ {pending_teams} pending) "
|
||||
"on {max_teams} expected.")
|
||||
content = format_lazy(text, tournament=tournament.name, date=tournament.inscription_limit,
|
||||
content = format_lazy(text, tournament=tournament.name, date=localtime(tournament.inscription_limit),
|
||||
validated_teams=tournament.participations.filter(valid=True).count(),
|
||||
pending_teams=tournament.participations.filter(valid=False).count(),
|
||||
max_teams=tournament.max_teams)
|
||||
@ -517,7 +518,8 @@ class VolunteerRegistration(Registration):
|
||||
text = _("<p>The draw of the solutions for the tournament {tournament} is planned on the "
|
||||
"{date:%Y-%m-%d %H:%M}. You can join it on <a href='{url}'>this link</a>.</p>")
|
||||
url = reverse_lazy("draw:index")
|
||||
content = format_lazy(text, tournament=self.tournament.name, date=self.tournament.solutions_draw,
|
||||
content = format_lazy(text, tournament=self.tournament.name,
|
||||
date=localtime(self.tournament.solutions_draw),
|
||||
url=url)
|
||||
informations.append({
|
||||
'title': _("Draw of solutions"),
|
||||
|
Reference in New Issue
Block a user