From a3ca0843aeb319c4cfe799d474364435cf0650f8 Mon Sep 17 00:00:00 2001 From: Nate Hardison Date: Fri, 31 May 2013 15:24:33 -0700 Subject: [PATCH] Use a setting for the favicon path The `FAVICON_PATH` setting determines the location of the favicon for the site. It's automatically adjusted when a theme is enabled, establishing the convention that themes will place their favicon in `static/images/favicon.ico`. --- lms/envs/aws.py | 2 ++ lms/envs/common.py | 2 ++ lms/templates/main.html | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lms/envs/aws.py b/lms/envs/aws.py index 588d9034db..52befc8211 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -124,6 +124,8 @@ SERVER_EMAIL = ENV_TOKENS.get('SERVER_EMAIL', SERVER_EMAIL) THEME_NAME = ENV_TOKENS.get('THEME_NAME', None) if not THEME_NAME is None: enable_theme(THEME_NAME) + FAVICON_PATH = 'themes/%s/images/favicon.ico' % THEME_NAME + #Timezone overrides TIME_ZONE = ENV_TOKENS.get('TIME_ZONE', TIME_ZONE) diff --git a/lms/envs/common.py b/lms/envs/common.py index 4102879723..be869628cf 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -330,6 +330,8 @@ STATICFILES_DIRS = [ PROJECT_ROOT / "static", ] +FAVICON_PATH = 'images/favicon.ico' + # Locale/Internationalization TIME_ZONE = 'America/New_York' # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html diff --git a/lms/templates/main.html b/lms/templates/main.html index d6cbe21095..f97c173d0d 100644 --- a/lms/templates/main.html +++ b/lms/templates/main.html @@ -33,7 +33,7 @@ })(this); - + <%static:css group='application'/>