The method I first pointed out might be easier: 
http://web2py.com/books/default/chapter/29/10#CSV

def csvtab():
>     rows = db(db.ptoday.id>0).select( ).as_list()
>     for row in rows:
>       data = row.csvdata
>

Note, .as_list() converts the Rows object to a list of dictionaries, so you 
cannot then do row.csvdata, because row is just a standard dict at that 
point (so it would be row['csvdata']). Anyway, .as_list() is not necessary 
here.
 

>       ddata = ''.join(line.replace('\n', '\n') for line in data)
>     return data
>
> @service.csv
> def exposed():
>    mytable = csvtab()
>

The above is not how you would do a csv service in web2py. Please read the 
book section on this for the proper code: 
http://web2py.com/books/default/chapter/29/10#Remote-procedure-calls.

Anthony

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to