def json(self): return { 'id': self.id, 'user': self.user.json(), 'text': self.text, 'createdAt': created_at2str(self.created_at) }
def json(self): return { 'id': self.id, 'user': self.user.json() if self.user else None, 'username': self.username_display(), 'count': self.count, 'createdAt': created_at2str(self.created_at) }
def dt2str(arg): return created_at2str(arg)