Aaron Swartz wrote:
> You can only iterate over it once. Calling .list() iterates over it.
> You can pass the result of that to the template if you want to use it
> multiple times.
>
>
thanks - okay, this now works:
list1 = web.select('products',where='name="Standard" ').list()
list2 = web.select('accounts')
print render.test_page(list1,list2)
$def with (list1, list2)
for x in list1:
$x['name']
for y in list2:
$y['name']
for z in list1:
$z['name']
but is there a way to do like:
$(list1[0])['name']
or how to use if list is only 1 element (dict)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---