Move the link map to the settings.

This commit is contained in:
Diana Huang
2013-05-06 12:55:42 -04:00
parent 5b3f5a47de
commit a8ea201b6a
2 changed files with 5 additions and 4 deletions

View File

@@ -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:

View File

@@ -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'}