Laurent 9 months ago
commit 8acf5e9b37
  1. 1
      api/serializers.py
  2. 8
      tournaments/models/match.py
  3. 15
      tournaments/templates/tournaments/acc_active_email.html
  4. 1
      tournaments/views.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:

@ -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)

@ -1,13 +1,16 @@
<html>
<body>
{% 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 }}
<br><br>Veuillez cliquer sur le lien suivant pour activer votre compte :<br>
<a href="padelclub://{{ domain }}{% url 'activate' uidb64=uid token=token %}">Activer mon compte</a>
Si le lien ne marche pas, cliquer ici :
http://{{ domain }}{% url 'activate' uidb64=uid token=token %}?next={{ next }}
<br><br>Si le lien ne marche pas, cliquez <a href="http://{{ domain }}{% url 'activate' uidb64=uid token=token %}?next=index">ici</a>.
Une fois votre compte activé, connectez-vous dans l'app.
<br>Une fois votre compte activé, connectez-vous dans l'app.
A tout de suite sur Padel Club !
<br><br>À tout de suite sur <a href="https://padelclub.app">Padel Club</a> !
{% endautoescape %}
</body>
</html>

@ -657,6 +657,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

Loading…
Cancel
Save