From: Oleg B. <ph...@ma...> - 2005-09-09 13:05:25
|
On Fri, Sep 09, 2005 at 02:53:05PM +0200, Andreas Kostyrka wrote: > class Worktime(SQLObject): > customer = ForeignKey("customer", default=WHATDOIPUTHERE) > task = ForeignKey("task") > Now, a _set_customer setter doesn't work, because it needs the > corresponding .task value And what? > and it seems that _set_customer doesn't get > called by Worktime(...) It must get called. What version of SQLObject? > Supplying a callable default value would seem to be ok, BUT the callable > doesn't get any context (like arguments to the constructor, the row > object). Should it? Should datetime.now (for example) gets the context? Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |