def data(self): data = { 'id': self.key().id(), 'name': self.name, 'slug': self.slug, 'summary': self.summary, 'talks': [key.id() for key in self.talks], 'created_date': utils.jsonify(self.created_date), 'updated_date': utils.jsonify(self.updated_date), } return data
def data(self): data = { 'id': self.key().id(), 'title': self.title, 'summary': self.summary, 'link': self.link, 'presenters': self.presenters, 'tags': self.tags, 'date': utils.jsonify(self.date), 'source': [], 'created_date': utils.jsonify(self.created_date), 'updated_date': utils.jsonify(self.updated_date), } for source in self.sources: source_dict = { 'type': source.type, 'media_id': source.media_id, } if source.link_id: source_dict['link_id'] = source.link_id data['source'].append(source_dict) return data