Currently there is a problem (correct me if wrong) when you need to
override the content of an inner nested block.
{% block parent %}
some stuff
{% block child %}
child stuff
{% endblock %}
some other stuff
{% endblock %}
if you are in a template which extends the one above and you want to
override just the content of 'child' block you are stuck
if you just do:
{% block child %}
new child stuff
{% endblock %}
...you get two of the 'child' block, because you haven't overridden the
parent block, so there's another one from there.
But then if you need to override the parent block you have to copy and
paste all the content that you *don't* want to change, since {{ block.super
}} can't be used (the part you want to override is going to be reproduced
by the super).
Possible implementation difficulties aside, is it a namespacing problem? Do
we need a syntax for saying like:
{% block parent:child %}
new child stuff
{% endblock %}
...then Django can know you want to just override the inner nested block,
with everything else from the parent blocks being reproduced verbatim
(without having to copy and paste it breaking DRY)
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" 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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/26e7d546-0a49-408b-8480-b8d6b4aba608%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.