def investor_person(): """ Display investors subscription for a person form """ if request.method == "POST": info = request.form obj = User() obj.username = info['username'] obj.email = info['email'] obj.psswd = info['password'] obj.status = "active" data = Person() data.user = obj.id data.first_name = info['fname'] data.last_name = info['lname'] data.type_id = info['tipo-identificacion'] data.number_identification = info['numberID'] data.born_date = info['date'] inv = Investor() inv.investor = data.id mka = storage mka.reload() mka.new(obj) mka.save() mka.new(data) mka.save() mka.new(inv) mka.save() mka.close() return redirect('/profile-investor/{}'.format(obj.id), code=302) return render_template('signup_naturalperson.html', id=str(uuid.uuid4()))