Hello!

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


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to