I think Shai correctly seperates the concerns.
On Tue, Jun 4, 2013 at 11:03 PM, Shai Berger <[email protected]> wrote:
> But I think that most suggestions focused more on the other issue: How to
> enable the only-do-pre-and-post-if-body-not-empty semantics with a
> succinct,
> clear syntax.
>
And considering the above, I think the original syntax:
{% if my_bonnet.bees %}
<ul>
{% for bee in my_bonnet.bees %}
<li>{{ bee }}
...
is still the clearest. You just have to make sure that you put *bees* directly
into the context if it is expensive, so it is impossible for a template
author to evaluate it twice. If that didn't happen, *{% with %}* still
exists.
I don't see any other suggestions add in clarity, or make for significantly
less code.
- Tino
--
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.