Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
e97fa49b
Commit
e97fa49b
authored
May 04, 2016
by
Douglas Hall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check microsite configurations for PLATFORM_NAME setting before defaulting to global setting
parent
00cbc291
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
lms/djangoapps/student_account/views.py
+8
-7
No files found.
lms/djangoapps/student_account/views.py
View file @
e97fa49b
...
...
@@ -20,7 +20,6 @@ from django.views.decorators.http import require_http_methods
from
lang_pref.api
import
released_languages
,
all_languages
from
edxmako.shortcuts
import
render_to_response
from
microsite_configuration
import
microsite
from
external_auth.login_and_register
import
(
login
as
external_auth_login
,
...
...
@@ -37,6 +36,7 @@ from third_party_auth import pipeline
from
third_party_auth.decorators
import
xframe_allow_whitelisted
from
util.bad_request_rate_limiter
import
BadRequestRateLimiter
from
openedx.core.djangoapps.theming.helpers
import
is_request_in_themed_site
,
get_value
as
get_themed_value
from
openedx.core.djangoapps.user_api.accounts.api
import
request_password_change
from
openedx.core.djangoapps.user_api.errors
import
UserNotFound
...
...
@@ -67,11 +67,12 @@ def login_and_registration_form(request, initial_mode="login"):
# Retrieve the form descriptions from the user API
form_descriptions
=
_get_form_descriptions
(
request
)
# If this is a
micro
site, revert to the old login/registration pages.
# If this is a
themed
site, revert to the old login/registration pages.
# We need to do this for now to support existing themes.
# Microsites can use the new logistration page by setting
# 'ENABLE_COMBINED_LOGIN_REGISTRATION' in their microsites configuration file.
if
microsite
.
is_request_in_microsite
()
and
not
microsite
.
get_value
(
'ENABLE_COMBINED_LOGIN_REGISTRATION'
,
False
):
# Themed sites can use the new logistration page by setting
# 'ENABLE_COMBINED_LOGIN_REGISTRATION' in their theme/microsite
# configuration settings.
if
is_request_in_themed_site
()
and
not
get_themed_value
(
'ENABLE_COMBINED_LOGIN_REGISTRATION'
,
False
):
if
initial_mode
==
"login"
:
return
old_login_view
(
request
)
elif
initial_mode
==
"register"
:
...
...
@@ -102,7 +103,7 @@ def login_and_registration_form(request, initial_mode="login"):
'initial_mode'
:
initial_mode
,
'third_party_auth'
:
_third_party_auth_context
(
request
,
redirect_to
),
'third_party_auth_hint'
:
third_party_auth_hint
or
''
,
'platform_name'
:
settings
.
PLATFORM_NAME
,
'platform_name'
:
get_themed_value
(
'PLATFORM_NAME'
,
settings
.
PLATFORM_NAME
)
,
# Include form descriptions retrieved from the user API.
# We could have the JS client make these requests directly,
...
...
@@ -389,7 +390,7 @@ def account_settings_context(request):
'options'
:
all_languages
(),
}
},
'platform_name'
:
settings
.
PLATFORM_NAME
,
'platform_name'
:
get_themed_value
(
'PLATFORM_NAME'
,
settings
.
PLATFORM_NAME
)
,
'user_accounts_api_url'
:
reverse
(
"accounts_api"
,
kwargs
=
{
'username'
:
user
.
username
}),
'user_preferences_api_url'
:
reverse
(
'preferences_api'
,
kwargs
=
{
'username'
:
user
.
username
}),
'disable_courseware_js'
:
True
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment