예제 #1
0
 def json(self):
     return {
         "id": self.id,
         "name": self.name,
         "created_at": datetime_browser_format(self.created_at),
         "updated_at": datetime_browser_format(self.updated_at)
     }
예제 #2
0
 def json(self):
     return {
         "id": self.id,
         "email": self.email,
         "username": self.username(),
         "domain": self.domain.name,
         "domain_id": self.domain_id,
         "created_at": datetime_browser_format(self.created_at),
         "updated_at": datetime_browser_format(self.updated_at)
     }
예제 #3
0
 def json(self):
     return {
         "id": self.id,
         "source": self.source,
         "destination": self.destination,
         "source_name": self.source_name(),
         "domain": self.domain.name,
         "domain_id": self.domain_id,
         "created_at": datetime_browser_format(self.created_at),
         "updated_at": datetime_browser_format(self.updated_at)
     }
예제 #4
0
 def json_duration(self):
     return datetime_browser_format(datetime(1970, 1, 1, 0, 0, 0, 0) + self.duration)
예제 #5
0
 def json_date(self):
     return datetime_browser_format(self.date)