[web2py] Re: nested loops in views

2016-10-14 Thread Pierre
I dedented it with an "air extractor"


{{extend 'layout.html'}}
{{ d={'a':[1,2],'b':[3,4]} }}

{{for k,v in d.items():}}{{=k}}
{{for vi in v:}}{{=vi}}{{pass}}{{pass}}


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: nested loops in views

2016-10-14 Thread Val K
just keep in mind simple rule:  {{pass}} == anti-indent 

On Friday, October 14, 2016 at 7:24:11 PM UTC+3, Pierre wrote:
>
> Hi,
>
> why is this not working ?
>
> {{extend 'layout.html'}}
> {{ d={'a':[1,2],'b':[3,4]} }}
> 
> {{for k,v in d.items():}}{{=k}}{{pass}}
> {{for vi in v:}}{{=vi}}{{pass}}
> 
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.