There are reasons.
1. It's handy and quick to type.
{% for x in lst %}
{% if x.is_something %}
{{ x }}
{% endif %}
{% endfor %}
vs
{% for x in lst if x.is_something %}
{{ x }}
{% endfor %}
I really believe it is a common task. For me it is.
2. It's pythonic. It wouldn't be
It's rather difficult to provide specific use case for something that is a
convenience-related proposal. :)
Let's make an analogy - why do we have AND boolean operator in IF tag,
though we could just write:
{% if first_condition %}
{% if second_condition %}
{{ x }}
{% endif %}
{%
Yes, but obviously this is not going to be the blessed, default behavior.
--
MikoĊaj Siedlarek
On Mon, Jun 27, 2011 at 3:15 PM, Max Arnold wrote:
> Another approach is to store language in the url (useful for mobile
> handsets where disabled or unsupported cookies is still an issue). Django
>