Trying to my create a home page, with django. I keep running into a TemplateDoesNotExist at error.
Im pretty sure it has something to do with my paths set up. I havent worked with django enough to debug this 🙁
Im trying to display an index.html file
My directory with all the files in them
Dokkaebi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Your index.html is in the wrong directory. To fix this error, create a folder named templates
in your app directory (i.e. learning_logs
). In the templates
folder, create another folder named learning_logs
and put your index.html
file there. So your path should look like this:
learning_logstemplateslearning_logsindex.html
This is assuming you left the default TEMPLATES setting in your settings.py. See https://docs.djangoproject.com/en/5.0/ref/settings/#templates
5