#2949: Django's templating engine too tightly tied to TEMPLATE_DIRS in the
settings module
---------------------------------+------------------------------------------
   Reporter:  [EMAIL PROTECTED]  |                Owner:  nobody                
     Status:  closed             |            Component:  Template system       
    Version:  SVN                |           Resolution:  worksforme            
   Keywords:                     |                Stage:  Design decision needed
  Has_patch:  0                  |           Needs_docs:  0                     
Needs_tests:  0                  |   Needs_better_patch:  0                     
---------------------------------+------------------------------------------
Comment (by anonymous):

 ok.. so I have the concept of "skins". A skin is a folder full of
 templates. Those template files always have the same names.
 
 Let's say I have 3 templates: template_a.html, template_b.html,
 template_c.html. All of these extend something like base.html and all of
 them include include.html. There are three skins: skin_a, skin_b, skin_c.
 A user can select his own skin.
 
 so, I have the following structure:
 
 skins/
 skins/skin_a/
 skins/skin_a/base.html
 skins/skin_a/include.html
 skins/skin_a/template_a.html
 skins/skin_a/template_b.html
 skins/skin_a/template_c.html
 skins/skin_b/
 skins/skin_b/base.html
 skins/skin_b/include.html
 skins/skin_b/template_a.html
 skins/skin_b/template_b.html
 skins/skin_b/template_c.html
 skins/skin_c/
 skins/skin_c/base.html
 skins/skin_c/include.html
 skins/skin_c/template_a.html
 skins/skin_c/template_b.html
 skins/skin_c/template_c.html
 
 (in other words, to make a new skin you just make a copy of skin_a or
 skin_b or skin_c and change the files - css and images work in a similar
 way)
 
 I want to be able to just set the skin (or folder) at runtime to something
 like skins/skin_a/ or skins/skin_b/ or skins/skin_c/ and then use
 template_a.html or template_b.html or whatever as the template name. So {%
 extends "base.html" %} or {% include "include.html" %} should just work
 (in other words - I don't want to have to do {% extends skin_a/base.html
 %}). Also.. my admin interface is done separately from the "frontend" and
 it might also have "base.html" or something else that might clash with the
 other templates. I obviously don't want to mix everything into the same
 namespace.
 
 I've already solved this problem by making my own "render_template(path,
 template, ..) function and one or two subclasses, but I'm interested to
 hear how this will work using a django template loader.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2949#comment:5>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to