Hi, I’m using Django Version: 4.0.6 and Python Version: 3.10.5 on windows 10
I am getting the “TemplateDoesNotExist” error and trying to resolve it since past 2 days.
I have added the path for templates folder.
‘DIRS’: [os.path.join(BASE_DIR, ‘templates’)],
Because this didn’t work I also created another templates folder inside the app. and I’m still getting the same error.
I have used the following lines in the views.py
return render(request, ‘store/home.html’, {‘products’ : products})
I have recently started learning Django and this is getting frustrating. Please need some help. Below is the error message
Template-loader postmortem
Django tried loading these templates, in this order:
Using engine django
:
-
django.template.loaders.filesystem.Loader
: D:\ecommerce\store\home.html (Source does not exist) -
django.template.loaders.filesystem.Loader
: D:\templates\store\home.html (Source does not exist) -
django.template.loaders.app_directories.Loader
: D:\ecommerce\venv\lib\site-packages\django\contrib\admin\templates\store\home.html (Source does not exist) -
django.template.loaders.app_directories.Loader
: D:\ecommerce\venv\lib\site-packages\django\contrib\auth\templates\store\home.html (Source does not exist)