The LMS should serve favicon.ico also when a theme is enabled.
This commit is contained in:
15
lms/urls.py
15
lms/urls.py
@@ -5,6 +5,8 @@ from django.conf.urls.static import static
|
||||
|
||||
import django.contrib.auth.views
|
||||
|
||||
from microsite_configuration import microsite
|
||||
|
||||
# Uncomment the next two lines to enable the admin:
|
||||
if settings.DEBUG or settings.FEATURES.get('ENABLE_DJANGO_ADMIN_SITE'):
|
||||
admin.autodiscover()
|
||||
@@ -106,6 +108,14 @@ urlpatterns += (
|
||||
{'template': '404.html'}, name="404"),
|
||||
)
|
||||
|
||||
# Favicon
|
||||
favicon_path = microsite.get_value('favicon_path', settings.FAVICON_PATH)
|
||||
urlpatterns += ((
|
||||
r'^favicon\.ico$',
|
||||
'django.views.generic.simple.redirect_to',
|
||||
{'url': settings.STATIC_URL + favicon_path}
|
||||
),)
|
||||
|
||||
# Semi-static views only used by edX, not by themes
|
||||
if not settings.FEATURES["USE_CUSTOM_THEME"]:
|
||||
urlpatterns += (
|
||||
@@ -125,10 +135,7 @@ if not settings.FEATURES["USE_CUSTOM_THEME"]:
|
||||
|
||||
# Press releases
|
||||
url(r'^press/([_a-zA-Z0-9-]+)$', 'static_template_view.views.render_press_release', name='press_release'),
|
||||
|
||||
# Favicon
|
||||
(r'^favicon\.ico$', 'django.views.generic.simple.redirect_to', {'url': '/static/images/favicon.ico'}),
|
||||
)
|
||||
)
|
||||
|
||||
# Only enable URLs for those marketing links actually enabled in the
|
||||
# settings. Disable URLs by marking them as None.
|
||||
|
||||
Reference in New Issue
Block a user