예제 #1
0
파일: user.py 프로젝트: herove/leaftime
def init_password():
    if request.method == 'GET':
        return render_template('password.html')
    elif request.method == 'POST':
        email = request.form['email']
        password = request.form['password']
        result = RegistPasswordForm(email=email, password=password).validate()
        if result.is_success:
            user = User.create(email=email, password=password)
            login_user(user)
            return render_template('write.html')
        else:
            return render_templete('password.html')
예제 #2
0
def add_users():
    print 'add users......'
    User.create('*****@*****.**', '123456')
    User.create('*****@*****.**', '111111')