Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/apps/profiles/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,16 @@ def activate(request, uidb64, token):
def activateEmail(request, user, to_email):
mail_subject = 'Activate your user account.'
message = render_to_string('profiles/emails/template_activate_account.html', {
'user': user.username,
'username': user.username,
'domain': get_current_site(request).domain,
'uid': urlsafe_base64_encode(force_bytes(user.pk)),
'token': account_activation_token.make_token(user),
'protocol': 'https' if request.is_secure() else 'http'
})
email = EmailMessage(mail_subject, message, to=[to_email])
if email.send():
messages.success(request, f'Dear {user.username}, please go to you email {to_email} inbox and click on \
received activation link to confirm and complete the registration. *Note: Check your spam folder.')
messages.success(request, f'Dear {user.username}, please go to your email {to_email} inbox and click on \
the activation link to confirm and complete the registration. *Note: Check your spam folder.')
else:
messages.error(request, f'Problem sending confirmation email to {to_email}, check if you typed it correctly.')

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% autoescape off %}
Hi {{ user.username }},
Hi {{ username }},

Please click on the link below to confirm your registration:

Expand Down