Commit a8ea201b by Diana Huang

Move the link map to the settings.

parent 5b3f5a47
...@@ -28,11 +28,8 @@ def marketing_link(name): ...@@ -28,11 +28,8 @@ def marketing_link(name):
possible URLs for certain links. This function is to decides possible URLs for certain links. This function is to decides
which URL should be provided. which URL should be provided.
""" """
link_map = {'ABOUT': 'about_edx',
'CONTACT': 'contact',
'FAQ': 'help_edx',
'COURSES': 'courses'}
link_map = settings.MKTG_URLS.get('LINK_MAP')
if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE'): if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE'):
return settings.MKTG_URLS.get('ROOT') + settings.MKTG_URLS.get(name) return settings.MKTG_URLS.get('ROOT') + settings.MKTG_URLS.get(name)
elif name in link_map: elif name in link_map:
......
...@@ -595,3 +595,7 @@ MKTG_URLS = {'ROOT': '', ...@@ -595,3 +595,7 @@ MKTG_URLS = {'ROOT': '',
'CONTACT': '/contact', 'CONTACT': '/contact',
'HOW_IT_WORKS': '/how-it-works', 'HOW_IT_WORKS': '/how-it-works',
'SCHOOLS': '/schools'} 'SCHOOLS': '/schools'}
MKTG_URLS['LINK_MAP'] = {'ABOUT': 'about_edx',
'CONTACT': 'contact',
'FAQ': 'help_edx',
'COURSES': 'courses'}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment