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')

posted @ 2020-04-28 17:30  程序员小艺  阅读(268)  评论(0编辑  收藏  举报