[sqlalchemy] Re: as_dictionary between classes

2015-01-27 Thread Jonathan Vanasco
Unless I understand you wrong, this should be all you need: def as_dictionary(self): song = { "id": self.id, "info": self.info.as_dictionary() } return song > FWIW, I just use a base class / mixin that has this method: class UtilityObject(object): def

[sqlalchemy] as_dictionary between classes

2015-01-27 Thread Michael Nickey
Hi all, I'm trying to configure these two classes so the song class returns the contents of the file dictionary as well but am having issues figuring this out. Here is what I have so far. If you have any suggestions on how I can get Song.as_dictionary to return something like this: > { > >