Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
2947ce24
Commit
2947ce24
authored
11 years ago
by
Diana Huang
Browse files
Options
Downloads
Patches
Plain Diff
Better error handling for when marketing urls are missing from the settings.
parent
63612800
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/djangoapps/mitxmako/shortcuts.py
+6
-2
6 additions, 2 deletions
common/djangoapps/mitxmako/shortcuts.py
lms/envs/aws.py
+1
-1
1 addition, 1 deletion
lms/envs/aws.py
with
7 additions
and
3 deletions
common/djangoapps/mitxmako/shortcuts.py
+
6
−
2
View file @
2947ce24
...
...
@@ -14,10 +14,12 @@
from
django.template
import
Context
from
django.http
import
HttpResponse
import
logging
from
.
import
middleware
from
django.conf
import
settings
from
django.core.urlresolvers
import
reverse
log
=
logging
.
getLogger
(
__name__
)
def
marketing_link
(
name
):
...
...
@@ -32,14 +34,16 @@ def marketing_link(name):
# link_map maps URLs from the marketing site to the old equivalent on
# the Django site
link_map
=
settings
.
MKTG_URL_LINK_MAP
if
settings
.
MITX_FEATURES
.
get
(
'
ENABLE_MKTG_SITE
'
):
if
settings
.
MITX_FEATURES
.
get
(
'
ENABLE_MKTG_SITE
'
)
and
name
in
settings
.
MKTG_URLS
:
# special case for when we only want the root marketing URL
if
name
==
'
ROOT
'
:
return
settings
.
MKTG_URLS
.
get
(
'
ROOT
'
)
return
settings
.
MKTG_URLS
.
get
(
'
ROOT
'
)
+
settings
.
MKTG_URLS
.
get
(
name
)
elif
name
in
link_map
:
# only link to the old pages when the marketing site isn't on
elif
not
settings
.
MITX_FEATURES
.
get
(
'
ENABLE_MKTG_SITE
'
)
and
name
in
link_map
:
return
reverse
(
link_map
[
name
])
else
:
log
.
warning
(
"
Cannot find corresponding link for name: {name}
"
.
format
(
name
=
name
))
return
'
#
'
...
...
This diff is collapsed.
Click to expand it.
lms/envs/aws.py
+
1
−
1
View file @
2947ce24
...
...
@@ -80,7 +80,7 @@ META_UNIVERSITIES = ENV_TOKENS.get('META_UNIVERSITIES', {})
COMMENTS_SERVICE_URL
=
ENV_TOKENS
.
get
(
"
COMMENTS_SERVICE_URL
"
,
''
)
COMMENTS_SERVICE_KEY
=
ENV_TOKENS
.
get
(
"
COMMENTS_SERVICE_KEY
"
,
''
)
CERT_QUEUE
=
ENV_TOKENS
.
get
(
"
CERT_QUEUE
"
,
'
test-pull
'
)
MKTG_URLS
=
ENV_TOKENS
.
get
(
'
MKTG_URLS
'
,
{}
)
MKTG_URLS
=
ENV_TOKENS
.
get
(
'
MKTG_URLS
'
,
MKTG_URLS
)
############################## SECURE AUTH ITEMS ###############
# Secret things: passwords, access keys, etc.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment