diff --git a/taccsite_cms/settings/settings.py b/taccsite_cms/settings/settings.py index cc1eed190..d3156e6b2 100644 --- a/taccsite_cms/settings/settings.py +++ b/taccsite_cms/settings/settings.py @@ -353,13 +353,7 @@ def gettext(s): return s TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - # FAQ: List custom directory first, so custom templates take precedence - # SEE: https://docs.djangoproject.com/en/2.2/topics/templates/#configuration - 'DIRS': glob( - os.path.join(BASE_DIR, 'taccsite_custom') - ) + [ - os.path.join(BASE_DIR, 'taccsite_cms', 'templates') - ], + 'DIRS': [os.path.join(BASE_DIR, 'taccsite_cms', 'templates')], 'OPTIONS': { 'context_processors': [ 'django.contrib.auth.context_processors.auth', @@ -382,8 +376,8 @@ def gettext(s): return s 'tacc_uri_shortcuts': 'taccsite_cms.templatetags.tacc_uri_shortcuts', }, 'loaders': [ + 'django.template.loaders.app_directories.Loader', 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader' ], }, }, @@ -408,6 +402,11 @@ def gettext(s): return s 'cms.middleware.language.LanguageCookieMiddleware' ] +try: + from taccsite_cms.settings_custom import CUSTOM_ASSET_DIR +except: + CUSTOM_ASSET_DIR = 'core-cms' + # Application definition INSTALLED_APPS = [ @@ -425,6 +424,8 @@ def gettext(s): return s # 'django.contrib.staticfiles', 'taccsite_cms.django.contrib.staticfiles_custom.apps.TaccStaticFilesConfig', 'django.contrib.messages', + 'taccsite_custom.' + CUSTOM_ASSET_DIR, + 'taccsite_cms', # key django CMS modules 'cms',