From: Markus W. B. <ma...@si...> - 2009-04-11 09:24:00
|
thanks for your help. Another question: I have found the (afaik undocumented) keyword param "title" of the col constructor. Is this meant as some sort of display name? In other words, can I set this and retrieve its value later for displaying it as a label? On Friday 10 April 2009 14:25:32 Oleg Broytmann wrote: > On Fri, Apr 10, 2009 at 12:06:38PM +0200, Markus W. Barth wrote: > > Hi, > > is there a possibility to figure out at runtime wich table a ForeignKey > > refers to? > > from sqlobject.classregistry import findClass > > class Test1(SQLObject): > test1=MultipleJoin('Test2', joinColumn='post_id') > > class Test2(SQLObject): > test2=ForeignKey('Test1') > > print findClass(Test2.sqlmeta.columns['test2ID'].foreignKey, > Test2.sqlmeta.registry) > > Oleg. |