I am trying to get user input for a 'username' and 'password' from a form in HTML so I can input them into my python script and have the program run. Where do I need to put the request.form to receive both variables?
app.py
from flask import Flask, render_template, url_for, request
app = Flask(__name__)
@app.route('/', methods=['POST', 'GET'])
def home():
rh = Robinhood()
rh.login(username="EMAIL", password="PASSWORD")
projectpath = request.form['projectFilepath']
return render_template('index.html')
index.html
<form action="{{ url_for('home') }}" method="post">
<input type="text" name="projectFilepath">
<input type="submit">
</form>
Very new to flask and python, thanks for the help!