On Jul 27, 9:05 am, Rodney Topor <r.to...@gmail.com> wrote:
> What is the recommended best practice for locating templates in a
> project directory?

Depends...

>  In particular, which of the following two
> structures is considered better?
>
> 1.  project/templates/{app1,app2,...}
>
> 2. project/{app1/templates, app2/templates,...}

The convention for the second scheme is:
project/{app1/templates/app1/, app2/templates/app2,...}

Out of the box, Django will first look for the first scheme, and
fallback on the second. For "pluggable" apps, you should provide
default, minimal templates with the app (so using scheme 2), and let
the app user override them (using scheme 1) as needed.

For project-specific apps, since you'll have to use project-wide
templates for your base templates and pluggable apps override, scheme
2 doesn't really makes sense IMHO.

My 2 cents...

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