def to_dict(self): d = { "id": self.id, "operator_id": self.operator.id, "operator_name": self.operator.nickname, "content": self.content, "create_time": format_date(self.create_time) } return d
def to_dict(self): d = { "id": self.id, "target": self.target.to_dict(), "operator": self.operator.to_dict(), "content": self.content.content, "type": self.content.type, "create_time": format_date(self.create_time), "count": 1 } return d
def screen_update_time(self): return format_date(self.update_time)
def screen_create_time(self): return format_date(self.create_time)
def screen_publish_time(self): return format_date(self.publish_date) if self.publish_date else ""