Re: Saving a rol with a derivative atribute
Oleg Broytman <[email protected]> Wed, 11 Sep 2013 19:19:01 +0400
| Newsgroups | gmane.comp.python.sqlobject |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Sep 11, 2013 at 06:29:57PM +0400, Oleg Broytman <[email protected]> wrote: > If you only need to set the default once you can override method > __init__ in your class, set the default and call parent's __init__. You > can also override .set() but simple assignment like > > row.title = new_value > > doesn't call 'set(). If you want to catch all assignments events is the > only route. And, BTW, overriding ._create() would be simpler than __init__. Oleg. -- Oleg Broytman http://phdru.name/ [email protected] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. Consolidate legacy IT systems to a single system of record for IT 2. Standardize and globalize service processes across IT 3. Implement zero-touch automation to replace manual, redundant tasks http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk