我正在尝试在 pythonanywhere 上部署我的 webapp,但是我的模板根本没有呈现,但是相同的代码在我本地的 visual studio 上显示得很好。
我收到以下错误。
我的看法如下:
from django.shortcuts import render
# Create your views here.
def Home(request):
return render(request, 'Home.html')
我的设置是
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',
],
},
},
]
请帮忙,我错过了什么?