Insert table fields dynamically using Import CSV

41 views
Skip to first unread message

Sarbjit

unread,
Oct 19, 2013, 10:03:13 AM10/19/13
to web...@googlegroups.com
Hi,

I am using "table.import_from_csv_file(file)" option for adding entries in the database. But in my application, table fields are dynamic and I want that on import csv, if a new column (header) is specified in csv file, a new field should be created in database.

Is it feasible to do so, any pointers?

Thanks
sarbjit

Massimo Di Pierro

unread,
Oct 19, 2013, 6:23:54 PM10/19/13
to web...@googlegroups.com
This will write a web2py model given a CSV file:

Reply all
Reply to author
Forward
0 new messages