Hello everyone,
I’m new to the Django community and this is my first time asking for help here. English is not my first language, so I used a translator to write this message.
I’m encountering an error when trying to access the URL /blog/
in my Django project. The error message is:
TemplateDoesNotExist at /blog/
blog/index.html
I have already created the template index.html
inside the blog
directory, but it still doesn’t seem to be recognized.
Could someone please help me understand why this error is happening and how I can fix it?
Thank you very much!
He tratado de leer las preguntas referentes a este problema pero sigo sin entender, espero su ayuda.
Gracias!
Welcome @Marygaleano24 !
The template file should be ”your project dir”/blog/templates/blog/index.html
. Additionally, you need to ensure that the APP_DIRS
is True
in the TEMPLATES
setting.
1 Like
Thank you for the help!
I followed the instructions for creating the templates
directory, and now it works. I must have made a mistake with the location initially.
Thank you again for your assistance!
One side note here is: you can customize your template dir by following this link How to override templates | Django documentation | Django