这是我的设置:
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
# Insert your TEMPLATE_CONTEXT_PROCESSORS here or use this
# list if you haven't customized them:
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.static",
"django.core.context_processors.media",
"django.core.context_processors.request",
"django.core.context_processors.tz",
"mezzanine.conf.context_processors.settings",
"mezzanine.pages.context_processors.page",
"main.context_processors.global_settings",
],
"builtins": [
"mezzanine.template.loader_tags",
],
},
},
]
我有结构:
project_name
- theme_1
- theme_2
- templates
-- theme_1
--- index.html
--- base.html
-- theme_2
--- index.html
--- base.html
- static
- project_name
我还尝试在应用/主题中添加结构:
theme_1
- templates
-- theme_1
--- base.html
theme_2
- templates
-- theme_2
--- base.html
这可能是什么问题?为什么我的模板文件没有加载?我只获得要加载的默认Mezzanine项目模板和静态文件。