Answer the question
In order to leave comments, you need to log in
Why does Django get a TemplateDoesNotExist error?
In settings.py I specified an absolute link to TEMPLATE_DIRS. Climbs TemplateDoesNotExist, why?
****
TEMPLATE_DIRS = [
'/home/***/venv/project/templates'
]
views.py
from django.shortcuts import render
from django.http.response import HttpResponse
from django.template.loader import get_template
def show_blog( request):
html = get_template('index.html')
return HttpResponse(html)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question