Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Jinja2: default text when iterating over list

Received: by 10.236.43.52 with SMTP id k40mr11980592yhb.21.1349108954856;
        Mon, 01 Oct 2012 09:29:14 -0700 (PDT)
X-BeenThere: pocoo-libs@googlegroups.com
Received: by 10.236.186.99 with SMTP id v63ls10694647yhm.1.gmail; Mon, 01 Oct
 2012 09:29:14 -0700 (PDT)
Received: by 10.236.35.229 with SMTP id u65mr2145918yha.16.1349108954210;
        Mon, 01 Oct 2012 09:29:14 -0700 (PDT)
Date: Mon, 1 Oct 2012 09:29:13 -0700 (PDT)
From: Marten Lehmann <lehm...@cnm.de>
To: pocoo-libs@googlegroups.com
Message-Id: <4c73f70a-5d15-4323-839b-c786445a0046@googlegroups.com>
In-Reply-To: <CADymufZmTxn4VzuC4Zb6uonpZOSA6e_3QGJfsyE1LNm=gLB+RA@mail.gmail.com>
References: <50691049.4060302@cnm.de>
 <CADymufZmTxn4VzuC4Zb6uonpZOSA6e_3QGJfsyE1LNm=gLB+RA@mail.gmail.com>
Subject: Re: Jinja2: default text when iterating over list
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_512_17166573.1349108953623"

------=_Part_512_17166573.1349108953623
Content-Type: multipart/alternative; 
	boundary="----=_Part_513_17597238.1349108953623"

------=_Part_513_17597238.1349108953623
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

On Monday, October 1, 2012 5:44:35 AM UTC+2, Steven Kryskalla wrote:
>
> It is mentioned in the docs here: 
>
> http://jinja.pocoo.org/docs/templates/#for 
>
> "If no iteration took place because the sequence was empty or the 
> filtering removed all the items from the sequence you can render a 
> replacement block by using else" 
>

Thanks, you're right. I obviously wasn't reading the explicit 
for-documentation, but I was just looking at arbitrary examples of the for 
loop everywhere else, which don't contain the else part.

------=_Part_513_17597238.1349108953623
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

On Monday, October 1, 2012 5:44:35 AM UTC+2, Steven Kryskalla wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">It is mentioned in the docs here:
<br>
<br><a href="http://jinja.pocoo.org/docs/templates/#for" target="_blank">http://jinja.pocoo.org/docs/<wbr>templates/#for</a>
<br>
<br>"If no iteration took place because the sequence was empty or the
<br>filtering removed all the items from the sequence you can render a
<br>replacement block by using else"
<br></blockquote><div><br>Thanks, you're right. I obviously wasn't reading the explicit 
for-documentation, but I was just looking at arbitrary examples of the 
for loop everywhere else, which don't contain the else part.<br></div>
------=_Part_513_17597238.1349108953623--

------=_Part_512_17166573.1349108953623--