I have the following route that is getting values from a submitted form
@app.route('/authenticate', methods=["POST"])
def authenticate():username = request.form['username']print(username, file = sys.stderr)password = request.form['password']email = request.form['email']models.User.create_user(email, password, username)return render_template('signup.html')
The problem I'm running into is that I'm getting a Bad Request The browser (or proxy) sent a request that this server could not understand.
I have checked that I am correctly getting the values from the form, and that all the forms have content in them, but It's not seeming to work.
Here is the template that renders the view
<form action ="/authenticate" method="POST" id="signup"><fieldset class="form-group"><label for="InputUsername"> Username </label><input type="text" class="form-control" name="username" id="InputUsername" placeholder="Enter username"></fieldset><fieldset class="form-group"><label for="exampleInputEmail1">Email address</label><input type="email" class="form-control" name="email"id="exampleInputEmail1" placeholder="Enter email"><small class="text-muted">We'll never share your email with anyone else.</small></fieldset><fieldset class="form-group"><label for="exampleInputPassword1">Password</label><input type="password" class="form-control" name="password "id="exampleInputPassword1" placeholder="Password"></fieldset></form>
and here is my view class that the forms are on
@app.route('/signup')
def login():return render_template("signup.html")