[Answer]-Django template dir strange behaviour


You specified templates/home.html instead of just home.html.

A template name will be appended to a TEMPLATE_DIRS, so /foo/templates/ as TEMPLATE_DIRS will become /foo/templates/templates/home.html if templates/home.html is a template name. Instead, the template name should be just home.html and the resulting template path would be /foo/templates/home.html which is correct.


Leave a comment