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.

Malcolm, if you read this, any chance this patch might be considered
if I talk about it on the dev group, or should I just eat it and use a
context_processor ?


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