Hi!
I got a problem, I wanna print a list or string on a 'view' using a 'for'
but the view only show me the last number or letter. For example:
My controller...
for i in 'hola':
print i
return locals()
My view...
{{=i}}
The view only show me the letter 'a'.
Other example:
a = [1
In your controller:
a = [1,2,3]
return locals()
In your view:
{{for i in a:}}
{{=i}}
{{pass}}
On Tue, May 12, 2015 at 11:46 PM, KevC wrote:
> Hi!
>
> I got a problem, I wanna print a list or string on a 'view' using a 'for'
> but the view only show me the last number or letter. For
Also, note that you don't use "print" in web2py -- printing prints to the
console and has no effect on the HTML returned by the server to the
browser. In web2py, a controller action returns a dictionary of data, and
the view then uses that data in constructing the HTML. Controllers do not
direc
3 matches
Mail list logo