It looks like the only place I can find where {{ block.super }} is
documented[1] doesn't include explicitly explain how the super block is
executed, but it is certainly the reasonable thing to do: execute the super
block in the current template's context as if it hadn't been overridden.
Otherwise overriding both {{ block one }} and {{ block base }} would be
impossible.

[1]:
https://docs.djangoproject.com/en/1.5/topics/templates/#template-inheritance


On Sat, Apr 27, 2013 at 5:05 AM, Jonathan Slenders <
[email protected]> wrote:

> Hi all,
>
> Somebody reported a bug for django-template-preprocessor. I'm wondering
> whether this is documented behaviour for the Django template language, or
> whether this is just something that happens to be this way because of the
> implementation.
>
> https://github.com/citylive/django-template-preprocessor/issues/24
>
>
> in base:
>
> <p>some html here</p>{% block base %}    {% block one %}        <p>block 
> one</p>    {% endblock %}{% endblock %}
>
>
> In inherited:
>
> {% extends "template_base.html" %}<p>a little bit more html here</p>{% block 
> base %}            {{ block.super }}            <p>and more html</p>{% 
> endblock %}{% block one %}            <p>overriden block</p>{% endblock %}
>
>
> The result of Django:
>
> <p>some html here</p><p>overriden block</p><p>and more html</p>
>
>
>
> Is this documented? If so, then I need to fix it.
> (btw, django-template-preprocessor deserves an update as well. It's still
> working nice, but hasn't seen that much progress last year.)
>
>
> Thanks,
> Jonathan
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-developers?hl=en
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to