I'm pretty new to this and I have a python algorithm which I want to run with two parameters that I get from an html form. Here is my html code:
<form action="result/">
<p><input class="w3-input w3-padding-16" method = "post" type="text" placeholder="Playlist URI" required name="URI"></p>
<p><input class="w3-input w3-padding-16" method = "post" type="text" placeholder="Spotify Username" required name="Username"></p>
<p>
<button class="w3-button w3-light-grey w3-padding-large" type="submit">
<i class="fa fa-paper-plane"></i> Submit
</button>
</p>
</form>
It redirects me to http://127.0.0.1:5000/result/?URI=b&Username=c, when I input b and c into the form.
I can't figure out how to accept them as parameters though, and it just returns this error:
404 Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
My python code looks like this:
@app.route('/result.html/<URI>&<username>')
def result(URI,username):
return render_template("result.html", uri=URI, username=username)