yea lets look at that...
for i in hola...
that sets i to 'h' then 'o' then 'l' and finally 'a' and prints each letter
to the console.
then 'return locals()'
i will be 'a' because that's what it was set to last.
get it?
so if you want hola or aloha...
controller:
i = 'aloha'
return i
view:
{{=i
why not put the '*for'* loop in views n your controller just pass the data
to the view.
best regards,
stifan
--
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)
2 matches
Mail list logo