#7324: {{ block.super }} doesn't work with nested {% block %} statements
--------------------------------------+-------------------------------------
Reporter: jeverling | Owner: nobody
Status: closed | Milestone:
Component: Template system | Version: SVN
Resolution: invalid | Keywords: block.super template
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
--------------------------------------+-------------------------------------
Comment (by bradleyw):
Hi Karen,
Indeed I had over-simplified the project, and it was late at night so I
forgot to include some stuff. My apologies for wasting your time.
Regardless, I've attached a better patch in the form of bug7324-better-
testcase.zip . This should better illustrate what I'm trying to do. There
are comments in the templates which indicate what I expect in each case.
In {{{templates-top/test.html}}}, I have a {{{block main}}} with a nested
{{{block submain}}}. This template extends {{{templates/new/test.html}}}.
If I include a {{{block.super}}} in {{{block main}}} of the child
template, the {{{block.super}}} from the nested {{{ block submain }}} is
included twice. If I remove the "my new sub-content" string from the child
template, and remove the parent block {{{block.super}}}, I get none of the
inherited content at all. So it seems like the parent {{{block.super}}} is
required for the child {{{block.super}}} to have any content, and the
child's inherited content will be rendered twice.
If you still disagree that it's a bug then fine, I won't re-open it until
you've looked over my new test case, but I feel my improved test case
(sorry about the first one) proves this is a bug.
--
Ticket URL: <http://code.djangoproject.com/ticket/7324#comment:5>
Django <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
-~----------~----~----~----~------~----~------~--~---