TemplateDoesNotExist в /fund_me issue
Я просмотрел ответы на аналогичный вопрос на этом сайте, но ничего не помогает, так как каждый раз я получаю одно и то же сообщение об ошибке. Буду очень признателен за помощь. СООБЩЕНИЕ ОБ ОШИБКЕ ВНИЗУ
дерево каталогов:
urls.py in fund_proj:
from django.contrib import admin
from django.urls import include, path
from fund_me import views
urlpatterns = [
path("admin/", admin.site.urls),
path("fund_me", include("fund_me.urls")),
]
urls.py in fund_me:
from django.contrib import admin
from django.urls import include, path
from . import views
urlpatterns = [path("", views.say_hello)]
views.py
from django.shortcuts import render
from django.http import HttpResponse
def say_hello(request):
context = {"name": "joe"}
return render(request, "fund_me/templates/hello_page.html", context)
settings.py (соответствующий код)
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [os.path.join(BASE_DIR, "templates"), "./fund_me/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",
],
},
},
]
сообщение об ошибке и отслеживание
вместо
return render(request, "fund_me/templates/hello_page.html", context)
запись
return render(request, "hello_page.html", context)