views.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:thunderingplains 作者: lyctc 项目源码 文件源码
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}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号