From 945a712d23bbfcd1617928eca31ce3ab8bb127d9 Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Wed, 18 Dec 2019 10:18:47 -0500 Subject: [PATCH] Fix hard-coded scheme in account activation email --- app/authentification/templates/acc_active_email.html | 2 +- app/authentification/views.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/authentification/templates/acc_active_email.html b/app/authentification/templates/acc_active_email.html index 4c7be2db..61d99bdd 100644 --- a/app/authentification/templates/acc_active_email.html +++ b/app/authentification/templates/acc_active_email.html @@ -1,5 +1,5 @@ {% autoescape off %} Hi {{ user.username }}, Please click on the link to confirm your email, -http://{{ domain }}{% url 'activate' uidb64=uid token=token %} +{{ scheme }}://{{ domain }}{% url 'activate' uidb64=uid token=token %} {% endautoescape %} diff --git a/app/authentification/views.py b/app/authentification/views.py index d57df650..d53cbafa 100644 --- a/app/authentification/views.py +++ b/app/authentification/views.py @@ -39,6 +39,7 @@ class SignupView(TemplateView): message = render_to_string('acc_active_email.html', { 'user': user, 'domain': current_site.domain, + 'scheme': request.scheme, 'uid': urlsafe_base64_encode(force_bytes(user.pk)).decode(), 'token': account_activation_token.make_token(user), })