我曾经将文件夹‘notes’改名为‘my_notes'
导致现在登上网页时错误
Template-loader postmortem
Django tried loading these templates, in this order:
Using engine django
:
django.template.loaders.filesystem.Loader
: /home/pmo/my_note/DIRS/notes/index.html (Source does not exist)django.template.loaders.app_directories.Loader
: /home/pmo/my_note/666/lib/python3.5/site-packages/django/contrib/admin/templates/notes/index.html (Source does not exist)django.template.loaders.app_directories.Loader
: /home/pmo/my_note/666/lib/python3.5/site-packages/django/contrib/auth/templates/notes/index.html (Source does not exist)django.template.loaders.app_directories.Loader
: /home/pmo/my_note/my_notes/templates/notes/index.html (Source does not exist)django.template.loaders.app_directories.Loader
: /home/pmo/my_note/users/templates/notes/index.html (Source does not exist)
我现在需要让django找到/home/pmo/my_note/my_notes/templates/my_notes/index.html
我试着把settings.py下TEMPLATES的DIRS改动
改成
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': {'DIRS': [os.path.join(BASE_DIR, 'my_notes', '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',
],
},
},
]
可是没有用,求助谢谢