On 7/30/07, Vsevolod Balashov <[EMAIL PROTECTED]> wrote: > beachcoder wrote: > > Hi, I posted the code from Pylons pastebin to > > http://sqlelixir.googlegroups.com/web/callbacks.py. Please go ahead if > > you want to add any of it to the Elixir codebase. > > please change this ugly implementation > > class Car(Entity): > has_field('name', String(30)) > > before_insert('before_insert_test') > def before_insert_test(self): print "%s before insert" > %self.name > > to decorator-like > > class Car(Entity): > has_field('name', String(30)) > > @before_insert > def before_insert_test(self): print "%s before insert" > %self.name
I agree with you that a decorator-based syntax would be much nicer, though I'd appreciate if somebody else did the change. Care to try to make a patch? -- Gaƫtan de Menten http://openhex.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SQLElixir" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlelixir?hl=en -~----------~----~----~----~------~----~------~--~---
