Sorry Chris, I was being a bit cryptic ...

Here is an excerpt from my settings.py

PROJECT_DIR = os.path.realpath(os.path.dirname(__file__)).replace('\\','/')
# if templates are not found here look in app_name/templates
TEMPLATE_DIRS = (os.path.join(PROJECT_DIR, 'templates/').replace('\\','/'),)

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    # filesystem ahead of app_directories looks in project first
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader'
    #'django.template.loaders.eggs.Loader',
)

... where PROJECT_DIR is the directory containing settings.py. I set mine this way for this project because it gives me a single directory containing a separate sub-dir for each application.

This works for both the dev server and mod_wsgi

Django will look in ../appdir/templates first if the loaders are reversed.

Mike





On 6/06/2011 11:47am, Christopher wrote:
> From what I understand, the location of my templates is supposed to go
in the TEMPLATE_DIRS block of the settings.py file.  This directory is
located in my home/foobar/, thus the /home/foobar/templates.

Is there something wrong with this?

On Jun 5, 4:38 pm, Mike Dewhirst<mi...@dewhirst.com.au>  wrote:
On 6/06/2011 6:51am, Christopher wrote:

110     "/home/foobar/templates",
???

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to