Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions taccsite_cms/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,13 +361,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',
Expand All @@ -390,8 +384,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'
],
},
},
Expand All @@ -416,6 +410,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 = [
Expand All @@ -433,6 +432,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',
Expand Down