On Sun, 2008-02-24 at 21:35 -0800, nwgadgetguy wrote:
[...]
> If the second example is followed, then the HTML code would be under
> mysite\books\templates,
> NOT mysite\books\templates\books, which makes it a confusing fix (why
> have another DIR [books]
> under templates when templates is already under the books project?).

It's quite common to have a book/templates/books/ hierarchy if you're
using the application loader for templates (which is the default).
Otherwise, you would only be able to have one template called
"search.html" amongst all of your installed apps. For common names like
index.html, base.html, search.html, etc, that would be asking for a
collision.

The app-based tempate loader merges all directories of the form
<app_name>/templates into a single tree node. If you have multiple
templates of the same name, you don't have any control over which one is
loaded (it's deterministic, but it's not a guaranteed stable piece of
behaviour in future versions).

Malcolm

-- 
If it walks out of your refrigerator, LET IT GO!! 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to