Provide logo URL from the backend
This commit is contained in:
@@ -6,6 +6,7 @@ Context dictionary for templates that use the ace_common base template.
|
||||
from django.conf import settings
|
||||
from django.urls import NoReverseMatch, reverse
|
||||
|
||||
from lms.djangoapps.branding.api import get_logo_url_for_email
|
||||
from common.djangoapps.edxmako.shortcuts import marketing_link
|
||||
from openedx.core.djangoapps.theming.helpers import get_config_value_from_site_or_settings
|
||||
|
||||
@@ -16,7 +17,6 @@ def get_base_template_context(site):
|
||||
"""
|
||||
# When on LMS and a dashboard is available, use that as the dashboard url.
|
||||
# Otherwise, use the home url instead.
|
||||
default_logo_url = getattr(settings, 'DEFAULT_EMAIL_LOGO_URL')
|
||||
try:
|
||||
dashboard_url = reverse('dashboard')
|
||||
except NoReverseMatch:
|
||||
@@ -38,5 +38,5 @@ def get_base_template_context(site):
|
||||
'CONTACT_MAILING_ADDRESS', site=site, site_config_name='contact_mailing_address'),
|
||||
'social_media_urls': get_config_value_from_site_or_settings('SOCIAL_MEDIA_FOOTER_URLS', site=site),
|
||||
'mobile_store_urls': get_config_value_from_site_or_settings('MOBILE_STORE_URLS', site=site),
|
||||
'logo_url': getattr(settings, 'LOGO_URL_PNG', default_logo_url),
|
||||
'logo_url': get_logo_url_for_email(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user