django部署报模板不存在

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'admin.controllers.common.setting',
'admin.controllers.common.systeminfo',
'index.controllers.common.setting',
],
},
},
]

需要添加os.path.join(BASE_DIR, 'templates')

猜你喜欢

转载自www.cnblogs.com/flyfly123/p/12795669.html
今日推荐