misc: update to use new TEMPLATES settings (#19578)
This commit is contained in:
parent
055151fc8b
commit
6e58343b18
|
@ -41,8 +41,6 @@ SECRET_KEY = 'r^(w+o4*txe1=t+0w*w3*9%idij!yeq1#axpsi4%5*u#3u&)1t'
|
|||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
TEMPLATE_DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
|
||||
|
@ -100,11 +98,30 @@ MIDDLEWARE_CLASSES = (
|
|||
)
|
||||
|
||||
# Serve xstatic files, required for gadjo
|
||||
STATICFILES_FINDERS = global_settings.STATICFILES_FINDERS + \
|
||||
('gadjo.finders.XStaticFinder',)
|
||||
STATICFILES_FINDERS = list(global_settings.STATICFILES_FINDERS) + \
|
||||
['gadjo.finders.XStaticFinder']
|
||||
|
||||
TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + \
|
||||
('combo.context_processors.template_vars',)
|
||||
# Templates
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [
|
||||
],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.template.context_processors.debug',
|
||||
'django.template.context_processors.i18n',
|
||||
'django.template.context_processors.media',
|
||||
'django.template.context_processors.static',
|
||||
'django.template.context_processors.tz',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'combo.context_processors.template_vars',
|
||||
],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'combo.urls'
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "combo.settings")
|
|||
from django.conf import settings
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
application = get_wsgi_application()
|
||||
if 'hobo.context_processors.statics_hash' in settings.TEMPLATE_CONTEXT_PROCESSORS:
|
||||
if 'hobo.context_processors.statics_hash' in settings.TEMPLATES[0]['OPTIONS']['context_processors']:
|
||||
# initialize versions as soon as possible as it may be used in most
|
||||
# requests via the statics_hash template var and we prefer not to
|
||||
# load the information during a user request.
|
||||
|
|
Loading…
Reference in New Issue