Beispiel #1
0
def add_member(project_id,email):
    session = database.get_session()

    user = userservice.get(email)

    member = Member()
    member.ProjectId = project_id
    member.UserId = user.UserId

    session.add(member)
    session.commit()
    session.close()

    if ENABLE_MAIL_NOTICE:
        p = projectservice.get(project_id)
        body = mailservice.render_mail_template('Team/AddMember.html',ProjectName=p.ProjectName,SystemUrl=HOST)
        mailservice.send_mail(email,p.ProjectName + u' 项目组欢迎您的加入 :)',body)
Beispiel #2
0
def profile():
    u = userservice.get(session['username'])
    return render_template('Profile/Detail.html',User=u)