Re: django templates - iterate over several lists

2013-03-08 Thread Roberto López López
Thank you very much! On 03/08/2013 03:12 PM, Javier Guerra Giraldez wrote: > On Fri, Mar 8, 2013 at 5:07 AM, Roberto López López > wrote: >> I'd like to avoid having to concatenate them in the view and pass that >> as another parameter. > > > two ideas come to mind: >

Re: django templates - iterate over several lists

2013-03-08 Thread Javier Guerra Giraldez
On Fri, Mar 8, 2013 at 5:07 AM, Roberto López López wrote: > I'd like to avoid having to concatenate them in the view and pass that > as another parameter. two ideas come to mind: - itertools.chain() on the view. it's equivalent to concatenating, but done lazily, so

django templates - iterate over several lists

2013-03-08 Thread Roberto López López
Hi, How can I iterate over several list objects available in my template? I'd like to avoid having to concatenate them in the view and pass that as another parameter. I mean something like this: {% for x in list1, list2, list3... listN %} {% if not forloop.first %}, {% endif %}write