def __repr__(self):
if self.start_time:
start_str = '%s' % self.start_time.strftime('%H:%M')
else:
start_str = 'None'
if self.end_time:
end_str = '%s' % self.end_time.strftime('%H:%M')
work_str = '%s' % str(self.work_time).split('.')[0]
else:
end_str = 'None'
work_str = 'in progress'
if self.tid is not None:
return '[%d:%s] - %s| %s (%s -> %s) - %s' % (self.tid,
self.uid,
self.last_end_date,
work_str,
start_str,
end_str,
self.name)
return '[%s] - %s| %s (%s -> %s) - %s' % (self.uid,
self.last_end_date,
work_str,
start_str,
end_str,
self.name)
评论列表
文章目录