def to_big_dict(self): """Returns a dict of all info about the user and related objects""" d = self.to_small_dict() d['Email'] = self.Email d['Headline'] = self.Headline d['Address'] = self.Address from server.models.award import award d['Awards'] = [award.get_by_id(x.id()).Name for x in self.Awards] d['Friends'] = [] for frk in self.Friends: d['Friends'].append(user.get_by_id(frk.id()).to_small_dict()) return d
def get_awards(self): """Get the list of proper awards objects""" from server.models.award import award return award.get_by_id(self.Awards)