def calendar(self):
pid = int(self.p['pid']) if 'pid' in self.p else -1
now = datetime.datetime.now()
year = int(self.p['year']) if 'year' in self.p else now.year
month = int(self.p['month']) if 'month' in self.p else now.month
show_subtasks = True if 'show' in self.p else False
project_a = projects_sql(self.gid)
if int(pid) > 0:
project = project_name_sql(self.gid, pid)
else:
project = ""
calendar_a = calendar_sql(self.gid, pid, year, month, show_subtasks)
msg_a = msg_sql(self.gid)
return {'user': self.user, 'project_a': project_a, 'pid': pid,
'project': project, 'month_num': month,
'month_name': calendar.month_name[month],
'year': year, 'calendar_a': calendar_a, 'msg_a': msg_a}
评论列表
文章目录