From a7c06fd296f348ba9d20a34c7f7db70a57b2eaf6 Mon Sep 17 00:00:00 2001 From: cahrens Date: Thu, 6 Aug 2015 14:56:28 -0400 Subject: [PATCH] Allow image files to be cached. --- lms/djangoapps/branding/__init__.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lms/djangoapps/branding/__init__.py b/lms/djangoapps/branding/__init__.py index fabc73a10f..e8fa35ee22 100644 --- a/lms/djangoapps/branding/__init__.py +++ b/lms/djangoapps/branding/__init__.py @@ -4,6 +4,7 @@ from django.conf import settings from opaque_keys.edx.locations import SlashSeparatedCourseKey from microsite_configuration import microsite +from staticfiles.storage import staticfiles_storage def get_visible_courses(): @@ -65,14 +66,8 @@ def get_logo_url(): university = microsite.get_value('university') if university is None and settings.FEATURES.get('IS_EDX_DOMAIN', False): - return '{static_url}images/edx-theme/edx-logo-77x36.png'.format( - static_url=settings.STATIC_URL - ) + return staticfiles_storage.url('images/edx-theme/edx-logo-77x36.png') elif university: - return '{static_url}images/{uni}-on-edx-logo.png'.format( - static_url=settings.STATIC_URL, uni=university - ) + return staticfiles_storage.url('images/{uni}-on-edx-logo.png'.format(uni=university)) else: - return '{static_url}images/default-theme/logo.png'.format( - static_url=settings.STATIC_URL - ) + return staticfiles_storage.url('images/default-theme/logo.png')