As the name implies, I use the Google App Engine and Django.
I have quite a lot of identical code in my templates, and I would like to reduce this by including template files. So, in my main application directory, I have a python handler file, a main template, and a template that I want to include in my main template.
I would think that the inclusion of {% include "fileToInclude.html"%} would work on its own, but it just does not contain anything. I assume that I need to change something, perhaps using TEMPLATE_DIRS, but I can not figure it out on my own.
EDIT:
I tried:
TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), 'templates'), )
But to no avail. I will also try other possibilities.
Python power
source share