From: Oleg B. <ph...@ph...> - 2009-09-30 08:49:34
|
On Wed, Sep 30, 2009 at 09:36:15AM +0100, Chris Wood wrote: > My column names don't (I don't think - I can't tell) follow one of the > standard styles. Do I need to create them all manually like: > > BOB = StringCol(dbName="BOB") > > or can I use the columns (or columnsList?) dictionary? If I can use columns, > how do I actually initialise / fill the dictionary? Either try simple (one-to-one) style, or name you columns explicitly. I.e., either class Table1(sqlobject.SQLObject): class sqlmeta: table = 'Table1' idName = 'Table1ID' fromDatabase = True style = styles.Style() _connection = conn or class Table1(sqlobject.SQLObject): class sqlmeta: table = 'Table1' idName = 'Table1ID' _connection = conn BOB = StringCol(dbName='BOB') Oleg. -- Oleg Broytman http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |