My table has three records in it.. two that match my query below...
My 'index' class..
class index:
def GET(self):
recz = web.query("select * from new_mbr where
firstname='LINUS'", vars=locals())
for row in recz:
print row.ELIG_MBR_ID, row.FIRSTNAME, row.LASTNAME
print render.index(recz)
My template:
$def with (stuff)
$stuff
$for row in stuff:
I like $row.LASTNAME
$else:
FUDGE
My output..
XXXX 234324.0 LINUS MARCH XXXX 6666.0 LINUS EHFOWE
<web.utils.IterBetter instance at 0x00BDA4B8>
You can see I'm able to iterate over the results in the class.. and
the object is being passed to the template.. but iteration in the
template never happens. It doesn't even print "FUDGE".. What on earth
am I doing wrong?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---