On Thu, Sep 2, 2010 at 2:30 PM, burc...@gmail.com <burc...@gmail.com> wrote: > Hi Russell, > > I'd define >> {% for templ in template_list %} >> {% include templ %} >> {% endfor %} > as a special case, for which special command or pattern should exist. > > Should it be > {% for templ in template_list %} > {% try-include template %} > {% endfor %} > or the opposite to be called > {% require template %} instead of include, > or maybe this whole pattern should be written as > {% include-first templ %} > > But in most cases {% include %} is used as "require", so in my > opinion it should raise errors! > > I'd also consider a require-once pattern to fix common widget chrome > problems (i.e. different parts of the page might include jquery in > headers).
Either I'm completely missing the point you're trying to make, or you've completely missed the point I was making. Template rendering is a two step process: 1. Parse the template 2. Render the template. The point I was trying to make is that at step 1, we *can't* know the name of the subtemplate used in an {% include %}. This isn't a matter for negotiation or something we are in a position to design -- it's simply the way that the tag is implemented. I don't see how changing the name of the include tag to "require" or "try-include" changes anything, or how an alternate tag with those names would behave differently. Yours Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.