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`.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
})(this);
|
||||
</script>
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="${static.url('images/favicon.ico')}" />
|
||||
<link rel="icon" type="image/x-icon" href="${static.url(settings.FAVICON_PATH)}" />
|
||||
|
||||
<%static:css group='application'/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user