def info(request): """获取团队信息""" tid = request.GET['tid'] team_dict = team.info(tid) if team_dict is not None: return HttpResponse(json_helper.dumps_err(0, team_dict)) else: return HttpResponse(json_helper.dump_err_msg(ERR_STH_NO_MATCH, MSG_ACC_NOT_FOUND))
def new(request): tid = request.POST['tid'] title = request.POST['title'] content = request.POST['content'] return HttpResponse(json_helper.dumps_err(SUCCEED, topic.new(tid, title, content)))
def info(request): tpid = request.GET['topic'] return HttpResponse(json_helper.dumps_err(SUCCEED, topic.get(tpid)))
def remove(request): tpid = request.POST['topic'] topic.remove(tpid) return HttpResponse(json_helper.dumps_err(SUCCEED, '删除成功'))
def update(request): tpid = request.POST['topic'] title = request.POST['title'] content = request.POST['content'] topic.update(tpid, title, content) return HttpResponse(json_helper.dumps_err(SUCCEED, '修改成功'))
def newest_topic(request): return HttpResponse(json_helper.dumps_err(SUCCEED, topic.newest()))
def newest_teams(request): team_type = request.GET['b_type'] return HttpResponse( json_helper.dumps_err(SUCCEED, team.newest_teams(team_type)))
def newest(request): return HttpResponse( json_helper.dumps_err(SUCCEED, team.new_team_project_job()))
def name2mail(request): name = request.GET['name'] mails = team.name2mail(name) return HttpResponse(json_helper.dumps_err(SUCCEED, mails))