From b8be5c16746053754fcaafdf0c41272c389c3563 Mon Sep 17 00:00:00 2001 From: Muhammad Faraz Maqsood Date: Fri, 8 Mar 2024 11:26:21 +0500 Subject: [PATCH] change host from lms to drupal for email change template --- common/djangoapps/student/views/management.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/djangoapps/student/views/management.py b/common/djangoapps/student/views/management.py index b0eab00da44..09c6337053f 100644 --- a/common/djangoapps/student/views/management.py +++ b/common/djangoapps/student/views/management.py @@ -755,12 +755,15 @@ def do_email_change_request(user, new_email, activation_key=None, secondary_emai site = Site.objects.get_current() message_context = get_base_template_context(site) + drupal_host = configuration_helpers.get_value('DRUPAL_HOST', settings.DRUPAL_HOST) + site_name = configuration_helpers.get_value('SITE_NAME', settings.SITE_NAME) + site = (drupal_host or site_name) if not secondary_email_change_request else site_name message_context.update({ 'old_email': user.email, 'new_email': new_email, 'confirm_link': '{protocol}://{site}{link}'.format( protocol='https' if use_https else 'http', - site=configuration_helpers.get_value('SITE_NAME', settings.SITE_NAME), + site=site, link=confirm_link, ), })