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