[SQLObject] Re: unknown column table creation..novice
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Brian R. <br...@se...> - 2004-08-19 14:37:00
|
>> I am looking for a way to created a table from a list of values. Say I have: >> >> headers = ['bbd_id', 'co_name1', 'address1', 'address2', 'city', >> 'state', 'zip5', 'zip4', 'first_name', 'surname', 'telephone'] > > class MailList(SQLObject): > pass > > for header in headers: > MailList.addColumn(Col(name=header)) This works great, thnx! Next I want to create a new record: rows = zip(headers,cell) line_item = MailList.new(*rows) However the new method does not like this argument list: TypeError: new() takes exactly 1 argument (16 given) When I explicitly write out all 16 arguments, it works. |