Hi,

Ok, that's one approach. Ticket #1052 is open, where the proposed solution
is to add generic function handlers to TurboJson, so people could get this
without having to use a specific base class on their model classes. I'll be
aiming to close off #1052 in the next week or so.

Paul


On 8/20/07, jfr jr <[EMAIL PROTECTED]> wrote:
>
>
> I am not sure  this is the best way to fix my issue with serializing
> elixir objects as JSON but it appears to be working.  Any input or
> comments??
>
> class ElixirBase(object):
>     """ created so that the SQLAlchemy / Elixir objects can be
> serialized as JSON"""
>     def __json__(self):
>         result = {}
>         for name in self.c.keys():
>             result[name] = getattr(self, name)
>         return result
>
>
> Then do something like the following for all of my model objects
>
> class SomeModelObject(Entity,ElixirBase):
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to