Add links to resend mail confirmations
This commit is contained in:
parent
fbc25240e6
commit
3516b1fa04
9 changed files with 51 additions and 16 deletions
|
|
@ -12,7 +12,7 @@ from django.urls import reverse, reverse_lazy
|
|||
from django.utils.encoding import force_bytes
|
||||
from django.utils.http import urlsafe_base64_encode
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from registration.tokens import account_activation_token
|
||||
from registration.tokens import email_validation_token
|
||||
from note.models import MembershipTransaction
|
||||
|
||||
|
||||
|
|
@ -73,13 +73,13 @@ class Profile(models.Model):
|
|||
|
||||
def send_email_validation_link(self):
|
||||
subject = "Activate your Note Kfet account"
|
||||
message = loader.render_to_string('registration/account_activation_email.html',
|
||||
message = loader.render_to_string('registration/email_validation_email.html',
|
||||
{
|
||||
'user': self.user,
|
||||
'domain': "nk20.ynerant.fr",
|
||||
'site_name': "La Note Kfet",
|
||||
'protocol': 'https',
|
||||
'token': account_activation_token.make_token(self.user),
|
||||
'token': email_validation_token.make_token(self.user),
|
||||
'uid': urlsafe_base64_encode(force_bytes(self.user.pk)).decode('UTF-8'),
|
||||
})
|
||||
self.user.email_user(subject, message)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue