Hi all

I don't know wether it's me doing something wrong, or if it's a normal
limitation of Django's templates, or else, but anyway, here's the
problem:

I have a custom tag that sets a variable in the context (the usual
way, ie 'context[self.varname] = something'). This is not my first
custom tag, nor the first context-updating one, so I don't think
there's anything wrong so far.

Now I have this template that extends a base template - I didn't wrote
personnaly FWIW - that has quite a lot of nested blocks definitions -
the idea being to let you override either a whole block or just part
of it. Might be a good idea or not, don't know (as far as I'm
concerned, I wouldn't have done such a thing, but that's another
question...). The doc doesn't mention nesting blocks, but well, it
seems to work fine... *as long* as you only access vars defined in the
view itself *or* have the call to the context-setting tag in the same
block where you access the var. That is : when calling a context-
setting tag anywhere else (top level, prior block at the same level
etc), the var is just not there.

I strongly suspect this have to do with nesting blocks (is that even
supposed to be done ???), but a quick glance at the template package's
code wasn't enough for me to spot anything related, so I thought I'd
better ask here before having a closer look. So, if there's any guru
around (spirit of James B., are you here ?-)...

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