django.template.exceptions.TemplateDoesNotExist: AlgoDash/index.html

Posted by Poster under Error and Solution on 11/22/2021 | Points: 10 | Views : 36075 | Status : [Member] | Replies : 0

I was getting above error in dJango and struggled for more than an hour to fix it. Its very frustrating and confusing


Keep the templates folder under the root of the project where exists. So the html file should be in this case templates/AlgoDash/index.html

Change the DIRS value under TEMPLATES in like below

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [BASE_DIR + "/templates"],
'APP_DIRS': True,
'context_processors': [

And your project will work!


(No response found.)

Login to post response