Tom, Thanks again.

If so, stop trying - you cannot do -->  just to be clear:
I like to do this:
src
├── settings.py
│
├── templates
│   ├── logos
│   │   ├── logo1.html
│   │   └── logo2.html
│   └── titles
│       ├── title1.html
│       └── title2.html
├── main
│   ├── page.html <-- in here I like to say {% include "../templates/
logos/logo1.html" %} or {% include "templates/logos/logo1.html" %}
│   └── start.py (runs application and calls page.html)


Thanks Brian



On Nov 15, 9:11 am, Tom Evans <tevans...@googlemail.com> wrote:
> On Mon, Nov 15, 2010 at 1:49 PM, Brian <martinair.ameri...@gmail.com> wrote:
> > Tom
>
> > 1) the LOGO.html file contains the name of the directory it's in. (ex:
> > Logo.html in the root will display C:\ROOT) So when I run the web page
> > it displays all the Logo files that got included. When I run I have
> > multiple Logo files from up the tree but none from down.
>
> So you want something like this?
>
> templates
> ├── logo.html
> ├── subdir
> │   ├── logo.html
> │   └── page.html
> └── subdir2
>     ├── logo.html
>     └── page.html
>
> and have (eg) subdir/page.html like so:
>
> {% include "logo.html" %}
>
> and have that include "subdir/logo.html"?
>
> If so, stop trying - you cannot do that with the django's template
> loaders. You could implement your own loader to do that, but it would
> subvert how regular templates are loaded, and you probably wouldn't be
> able to run things like django admin or other 3rd party apps.
>
> At some point in your view, you must know which template you are
> rendering. Why not simply pass that information into the template in
> the context, and include logo.html based upon that variable.
>
>
>
> > 2) I tried multiple tuple values in the TEMPLATE_DIRS, I tried 30
> > value with forward and backward / & \, I like to go to the root with
> > relative path.
>
> I'll repeat it again, since it is relevant:
>
> TEMPLATE_DIRS should have _absolute_ paths only, and should use
> _forward slashes_ only.
>
>
>
> > 3) Performance is not a issue, just trying to get this to work.
>
> It's never an issue until it is :)
>
> Cheers
>
> Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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