问题描述
当我在settings.py中运行以下代码
TEMPLATES = [{
'BACKEND': 'django.template.backends.django.DjangoTemplates','DIRS': [os.path.join('BASE_DIR','template')],'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',],},]
它显示error template not found
,但是当我在settings.py中执行以下代码时
TEMPLATES = [{
'BACKEND': 'django.template.backends.django.DjangoTemplates','DIRS': ['templates'],]
这很好!
os.path.join('BASE_DIR','template')
的实际含义是什么?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)