On 27/07/2011 5:05pm, Rodney Topor wrote:
What is the recommended best practice for locating templates in a
project directory?  In particular, which of the following two
structures is considered better?

1.  project/templates/{app1,app2,...}

This is better if you have a separate team editing templates or it suits you to keep all templates in a single root.

2. project/{app1/templates, app2/templates,...}

This is better when you have lotsa apps and you are editing templates yourself


If some template is independent of the particular apps in a project,
is it OK to use structure 2 together with a templates directory in the
project directory?
Yes.

You can rearrange the following to suit your needs. If any template isn't found using the the first loader, django tries the second one.

TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader'
}

hth

Mike

Thanks,
Rodney


--
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