Initially, I had only one application in my Django project, the templates consisted of index.html a detail.html and layout.html ... index and detail files expanded the layout. They all lived in the same directory ([app1] / templates / [app1] /), and he could find all the files in order.
Now I have a second application, and I want to reuse layout.html ... I decided to make a dir template from the django project base and put it there. Here's what my directory structure looks like:
<basepath>/<django_project>/templates/shared <basepath>/<django_project>/<app1>/templates/<app1> <basepath>/<django_project>/<app2>/templates/<app2>
I updated settings.py options:
TEMPLATE_DIRS = ( '/full/path/to/<django_project>/<app1>/templates', '/full/path/to/<django_project>/<app2>/templates', '/full/path/to/<django_project>/templates', )
In the "shared" dir, I have layout.html ... from the dir files of app1 or app2, I have index.html, and the line "extends" at the top of the file reads:
{% extends "shared/layout.html" %}
However, when I try to load the application view, it receives an error message that it cannot find shared / layout.html
TemplateSyntaxError at / Caught TemplateDoesNotExist while rendering: shared/layout.html
Any ideas what I am missing? It should be pretty simple, should I ignore something really obvious?