Beispiel #1
0
    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
Beispiel #2
0
    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
Beispiel #3
0
 def screen_update_time(self):
     return format_date(self.update_time)
Beispiel #4
0
 def screen_create_time(self):
     return format_date(self.create_time)
Beispiel #5
0
 def screen_publish_time(self):
     return format_date(self.publish_date) if self.publish_date else ""