On Tue, 2008-09-30 at 08:22 -0700, bruno desthuilliers wrote:
> On 30 sep, 14:04, bruno desthuilliers <[EMAIL PROTECTED]>
> wrote:
> > On 29 sep, 23:16, bruno desthuilliers <[EMAIL PROTECTED]>
> > wrote:
> >
> > Partly answering to myself:
> >
> > (snip)
> >
> > > After a couple more tests and investigations, it appears that the
> > > nested blocks have nothing to do with my problem. What really happens
> > > is that, given
> >
> > > - a context updating tag
> > > - a base template base.html with a block defined in it,
> > > - and another template another.html extending base and filling the
> > > block
> >
> > > if you call the context updating tag at the "top level" of
> > > another.html, the updated context is not accessible from within the
> > > block.
> >
> > And after still more testing, it appears that the templatetag is
> > simply not called at all. Ok, this surely makes sense for content-
> > rendering templatetags - since this part of the template source file
> > will not be rendered at all. But this means that context-updating tags
> > cannot be called outside blocks (unless of course at the top-level of
> > the 'base' template).
> >
> > Mmm...
> >
> 
> Ok, I have a possible patch. It requires "context updating" nodes to
> explicitely declare themselves as such (either via a class attribute
> or via a property for those that can be used both ways), and a slight
> modification to ExtendsNode.render.

I don't really know if this is necessary or not, since I haven't had
time to sit down and work through this. However, keep in mind that any
proposed change like would have to still work with all existing tags. We
can't go around quietly breaking existing correctly-working tags in any
way, since that will cause quiet failures in users' code.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to