Couldn't you just create a dummy file in /channel_a for part2.html,  
and in /channel_b for part1.html, such that the dummy files do nothing  
but include the content of the corresponding parent?

On Jul 17, 2008, at 8:04 AM, 3xM wrote:

>
>
>
> On Jul 17, 1:59 pm, Arien <[EMAIL PROTECTED]> wrote:
>
>> Have you seen the section on loading templates in the documentation?
>> It contains a tip that describes how you can use select_template to
>> nicely deal with this type of situation
>
> Thanks for the fast reply.
>
> I Don't see how this would help me. I still want to rely on the
> fallback features of the template loading from directories in
> TEMPLATE_DIRS, as I don't want to copy templates for all parts of the
> playlist for each channel that differs a bit, but only those parts
> being different.
>
> I already tried loading templates a la
>
> '%s/name_of_template.html' % channel_template_folder
>
> but the result is that it when the template includes other templates,
> it will look for it in the same folder, not doing the fallback thing
> to the main generic template folder (as it is looking for something in
> a subfolder with the name of the value of channel_template_folder).
>
> Does it make sense?
>
> I'll try to illustrate the current template structure to clarify:
>
> .../templates
>    part_1.html
>    part_2.html
>    /channel_a
>        part_1.html
>    /channel_b
>        part_2.html
>
> (I hope the identation in the above doesn't get ignored as whitespace)
>
> So, normally I load e.g. 'part_1.html' which, somewhere in it,
> includes 'part_2.html'. That works just fine.
>
> But for Channel A I used to load 'channel_a/part_1.html', which will
> also include 'part_2.html'. But now the template system will look for
> a file called 'channel_a/part_2.html' which doesn't exist. And for
> Channel B, where I only want 'part_2.html' to be different from the
> generic, I can't get it to work without adding 'templates/channel_b'
> to TEMPLATE_DIRS. A "solution" is to copy all templates each time I
> want to make differences, but that seems quite stupid to me.
>
> So what I want is to temporarily add 'templates/channel_b' to
> TEMPLATE_DIRS for requests for playlists from Channel B. Is it somehow
> possible?
> >


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