diff --git a/cms/djangoapps/contentstore/views/public.py b/cms/djangoapps/contentstore/views/public.py index f4d1f7c77858..089f1d123c42 100644 --- a/cms/djangoapps/contentstore/views/public.py +++ b/cms/djangoapps/contentstore/views/public.py @@ -9,6 +9,7 @@ from django.shortcuts import redirect from common.djangoapps.edxmako.shortcuts import render_to_response +from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers from ..config.waffle import ENABLE_ACCESSIBILITY_POLICY_PAGE @@ -23,8 +24,11 @@ def register_redirect_to_lms(request): This view redirects to the LMS register view. It is used to temporarily keep the old Studio signup url alive. """ + frontend_register_url = configuration_helpers.get_value( + "FRONTEND_REGISTER_URL", settings.FRONTEND_REGISTER_URL + ) register_url = '{register_url}{params}'.format( - register_url=settings.FRONTEND_REGISTER_URL, + register_url=frontend_register_url, params=_build_next_param(request), ) return redirect(register_url, permanent=True) @@ -35,8 +39,11 @@ def login_redirect_to_lms(request): This view redirects to the LMS login view. It is used for Django's LOGIN_URL setting, which is where unauthenticated requests to protected endpoints are redirected. """ + frontend_login_url = configuration_helpers.get_value( + "FRONTEND_LOGIN_URL", settings.FRONTEND_LOGIN_URL + ) login_url = '{login_url}{params}'.format( - login_url=settings.FRONTEND_LOGIN_URL, + login_url=frontend_login_url, params=_build_next_param(request), ) return redirect(login_url) diff --git a/cms/templates/howitworks.html b/cms/templates/howitworks.html index b04a207eba6f..365d2d5b786d 100644 --- a/cms/templates/howitworks.html +++ b/cms/templates/howitworks.html @@ -7,6 +7,16 @@ from django.utils.translation import gettext as _ from urllib.parse import quote_plus from openedx.core.djangolib.markup import HTML, Text + from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers +%> + +<%! + frontend_register_url = configuration_helpers.get_value( + "FRONTEND_REGISTER_URL", settings.FRONTEND_REGISTER_URL + ) + login_url = configuration_helpers.get_value( + "LOGIN_URL", settings.LOGIN_URL + ) %> <%block name="title">${_("Welcome")}%block> @@ -163,10 +173,10 @@