Hi,

Am Sat, 31 Jan 2015 18:12:57 +0000
schrieb Unai Zalakain <[email protected]>:
> Correct me if I'm wrong but the same exact behaviour can be achieved
> by:
> 
>     {% block myblock %}
>     {% if myvariable %}
>     my content
>     {% else %}
>     {{ block.super }}
>     {% endif %}
>     {% endblock myblock %}

I guess you're right, but that's exactly Markus' point. This is
inconvenient -- it is exactly one of those tradeoffs Aymeric
mentioned, and seems not well balanced to me, as does not look good in
the template code and I don't suppose that every Django developers
knows about {{ block.super }}.

What is the technical reason for {% if … %}{% block %} not being
possible (or, not behaving as expected)? Enabling this syntax would
improve readability a lot and satisfy Markus' request as well
without introducing new syntax.
(Although from my uneducated guesses of how the blocks work, this might
be very hard and not worthy to implement.)

Raphael

-- 
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/20150131221221.574c4180%40arlen.
For more options, visit https://groups.google.com/d/optout.

Attachment: pgp0X_QE5nl3g.pgp
Description: Digitale Signatur von OpenPGP

Reply via email to