From 207fd12d9d16eace969e0468634d131c388fb878 Mon Sep 17 00:00:00 2001 From: Raz Date: Sun, 2 Feb 2025 10:41:52 +0100 Subject: [PATCH 1/3] fix match title --- tournaments/models/match.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tournaments/models/match.py b/tournaments/models/match.py index 92b6046..acdf519 100644 --- a/tournaments/models/match.py +++ b/tournaments/models/match.py @@ -158,11 +158,11 @@ class Match(models.Model): # No team scores at all if previous_top_match: - names = [f"Gagnants du {previous_top_match.computed_name()}", ''] + names = [f"Gagnants {previous_top_match.computed_name()}", ''] team = self.default_live_team(names) teams.append(team) if previous_bottom_match: - names = [f"Gagnants du {previous_bottom_match.computed_name()}", ''] + names = [f"Gagnants {previous_bottom_match.computed_name()}", ''] team = self.default_live_team(names) teams.append(team) elif len(team_scores) == 1: @@ -174,12 +174,12 @@ class Match(models.Model): teams.append(existing_team) else: if previous_top_match and previous_top_match.disabled == False and previous_top_match.end_date is None: - names = [f"Gagnants du {previous_top_match.computed_name()}", ''] + names = [f"Gagnants {previous_top_match.computed_name()}", ''] team = self.default_live_team(names) teams.append(team) teams.append(existing_team) elif previous_bottom_match: - names = [f"Gagnants du {previous_bottom_match.computed_name()}", ''] + names = [f"Gagnants {previous_bottom_match.computed_name()}", ''] team = self.default_live_team(names) teams.append(existing_team) teams.append(team) From 514aa568aaa342e7ecc3e5b996d78c73e84f1474 Mon Sep 17 00:00:00 2001 From: Raz Date: Mon, 3 Feb 2025 15:01:09 +0100 Subject: [PATCH 2/3] fix activation link error --- api/serializers.py | 1 + .../templates/tournaments/acc_active_email.html | 15 +++++++++------ tournaments/views.py | 1 + 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/api/serializers.py b/api/serializers.py index 9588991..b6459cf 100644 --- a/api/serializers.py +++ b/api/serializers.py @@ -89,6 +89,7 @@ class UserSerializer(serializers.ModelSerializer): 'token': account_activation_token.make_token(user), }) email = EmailMessage(mail_subject, message, to=[user.email]) + email.content_subtype = "html" email.send() class Meta: diff --git a/tournaments/templates/tournaments/acc_active_email.html b/tournaments/templates/tournaments/acc_active_email.html index bd85592..4160faa 100644 --- a/tournaments/templates/tournaments/acc_active_email.html +++ b/tournaments/templates/tournaments/acc_active_email.html @@ -1,13 +1,16 @@ + + {% autoescape off %} Bienvenue {{ user.username }} ! -Veuillez cliquer sur le lien suivant pour activer votre compte: -padelclub://{{ domain }}{% url 'activate' uidb64=uid token=token %}?next={{ next }} +

Veuillez cliquer sur le lien suivant pour activer votre compte:
+Activer mon compte -Si le lien ne marche pas, cliquer ici : -http://{{ domain }}{% url 'activate' uidb64=uid token=token %}?next={{ next }} +

Si le lien ne marche pas, cliquez ici. -Une fois votre compte activé, connectez-vous dans l'app. +
Une fois votre compte activé, connectez-vous dans l'app. -A tout de suite sur Padel Club ! +

A tout de suite sur Padel Club ! {% endautoescape %} + + diff --git a/tournaments/views.py b/tournaments/views.py index e1333a5..a5a3013 100644 --- a/tournaments/views.py +++ b/tournaments/views.py @@ -656,6 +656,7 @@ def send_verification_email(request, user, next_url): }) email = EmailMessage(mail_subject, message, to=[user.email]) + email.content_subtype = "html" email.send() @login_required From 57f9215a15a3d6809d0fb0524199eff92bb95df4 Mon Sep 17 00:00:00 2001 From: Raz Date: Mon, 3 Feb 2025 15:03:47 +0100 Subject: [PATCH 3/3] fix activation link error --- tournaments/templates/tournaments/acc_active_email.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tournaments/templates/tournaments/acc_active_email.html b/tournaments/templates/tournaments/acc_active_email.html index 4160faa..9bb6300 100644 --- a/tournaments/templates/tournaments/acc_active_email.html +++ b/tournaments/templates/tournaments/acc_active_email.html @@ -3,14 +3,14 @@ {% autoescape off %} Bienvenue {{ user.username }} ! -

Veuillez cliquer sur le lien suivant pour activer votre compte:
+

Veuillez cliquer sur le lien suivant pour activer votre compte :
Activer mon compte

Si le lien ne marche pas, cliquez ici.
Une fois votre compte activé, connectez-vous dans l'app. -

A tout de suite sur Padel Club ! +

À tout de suite sur Padel Club ! {% endautoescape %}