Have considered the sequence in which templates are loaded?
See http://docs.djangoproject.com/en/dev/ref/settings/
If you put the filesystem template loader ahead of the app_directories
django will find your own versions named identically with django
versions and use them instead.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
)
hth
Mike
I'm not sure this is correct but that is just my own uncertainty because
I haven't read those docs recently. However I took a different approach
which probably came from following one of the django books.
# if templates are not found here look in app_name/templates
TEMPLATE_DIRS = (os.path.join(PROJECT_ROOT, 'templates')
My PROJECT_ROOT is the path to settings.py
> The problem with the filesystem loader is that you need to specify all
> your template paths in the settings file, which is something I was
> trying to avoid as the app_directories loader was what I wanted.
As you can see I only specify one templates dir. If I want to use my own
templates for an imported app (or my own for that matter) I just create
a sub-directory in TEMPLATE_DIRS and give it the app name. Django just
knows where to look and uses any template it finds there in preference
to one of the same name in the installed site-packages app.
Cheers
Mike
> I guess the app_directories loader works on the order of apps listed in
> the INSTALLED_APPS tuple?
I don't know. You'd need to lok at the gjango source to get that.