views.py 文件源码

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

项目:thunderingplains 作者: lyctc 项目源码 文件源码
def post_add_task(self):
        """Adds new task if tid == -1, else updates task tid."""
        gid = self.gid
        uid = self.uid
        pid = self.p['pid']
        tid = -1 if 'tid' not in self.p else self.p['tid']
        ptid = 0 if 'ptid' not in self.p else self.p['ptid']
        [due_date, name] = [self.p[k] for k in ['due_date', 'name']]
        tid = post_add_task_sql(gid, pid, tid, ptid, due_date, name)
        post_add_log_sql(gid, uid, pid, tid, self.user['name'] +
                         " added new task: " + name)
        proj_name = project_name_sql(gid, pid)

        email_a = email_all_sql(gid)
        for rec_addr in email_a:
            send_email(rec_addr, "New Task Added to " + proj_name,
                       self.user['name'] + " added new task: " + name)
        return Response('OK')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号