コード例 #1
0
ファイル: __init__.py プロジェクト: ajford/RGVRSEF
def complete():
    finished = retrieve('finished')
    if finished is True:
        message = ["Your confirmation page has been viewed already.",
            "If you do not recieve your confirmation email, please contact us"]
        store(finished=True)
        return render_template('message.html', message=message)

    leader_id = retrieve('student_id')
    if leader_id is None:
        message = "Your session has expired. \
                Please restart your registration"
        return render_template('message.html', message=message)
    if leader_id == SIG_EXPIRED:
        message = "Your session has expired. \
                Please restart your registration"
        return render_template('message.html', message=message)
    leader = Student.query.get(leader_id)
    if leader is None:
        message = "Your session has expired. \
                Please restart your registration"
        return render_template('message.html', message=message)

    utils.project_reg_mail(leader.project)

    if app.config['TESTING']:
        store(student_id=leader_id)
    else:
        store(finished=True)
    return render_template('complete.html', leader=leader)
コード例 #2
0
ファイル: __init__.py プロジェクト: ajford/RGVRSEF
def projectconf(id):
    project = Project.query.get_or_404(id)
    utils.project_reg_mail(project)
    message = "Confirmation resent about project #%s, %s" % (project.id, project.title)
    return render_template("admin/message.html", message=message)