def marketing_link(name):
 link_map = settings.MKTG_URL_LINK_MAP
 enable_mktg_site = configuration_helpers.get_value('ENABLE_MKTG_SITE', settings.FEATURES.get('ENABLE_MKTG_SITE', False))
 marketing_urls = configuration_helpers.get_value('MKTG_URLS', settings.MKTG_URLS)
 if (enable_mktg_site and (name in marketing_urls)):
  if (name == 'ROOT'):
   return marketing_urls.get('ROOT')
  return urljoin(marketing_urls.get('ROOT'), marketing_urls.get(name))
 elif ((not enable_mktg_site) and (name in link_map)):
  if (link_map[name] is not None):
   return reverse(link_map[name])
 else:
  log.debug('Cannot find corresponding link for name: %s', name)
  return '#'

def marketing_link ( name ) : link_map = settings . MKTG_URL_LINK_MAP enable_mktg_site = configuration_helpers . get_value ( 'ENABLE_MKTG_SITE' , settings . FEATURES . get ( 'ENABLE_MKTG_SITE' , False ) ) marketing_urls = configuration_helpers . get_value ( 'MKTG_URLS' , settings . MKTG_URLS ) if ( enable_mktg_site and ( name in marketing_urls ) ) : if ( name == 'ROOT' ) : return marketing_urls . get ( 'ROOT' ) return urljoin ( marketing_urls . get ( 'ROOT' ) , marketing_urls . get ( name ) ) elif ( ( not enable_mktg_site ) and ( name in link_map ) ) : if ( link_map [ name ] is not None ) : return reverse ( link_map [ name ] ) else : log . debug ( 'Cannot find corresponding link for name: %s' , name ) return '#'
returns the correct url for a link to the marketing site depending on if the marketing site is enabled since the marketing site is enabled by a setting .