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')
def add_users(): print 'add users......' User.create('*****@*****.**', '123456') User.create('*****@*****.**', '111111')