def get_notifications(self): notifications = Notification.query(Notification.profile==self.logged.key).order(-Notification.created_at).fetch(5) return self.render_json({'notifications': [n.to_dict() for n in notifications]})