I can't seem to get the lookup to work right. I just keep getting an error of "404 Not Found". Here is the URL and it does load but doesn't load when I post to it for some reason http://ide50-ndjustin20.cs50.io:8080/quote.html
Here is my python code:
@app.route("/quote", methods=["GET", "POST"])
@login_required
@nocache
def quote():
# User reached route via POST (as by submitting a form via POST)
if request.method == "POST":
symbolList = []
symbol = request.form.get("symbol")
symbolList = lookup(symbol)
return render_template("quote.html", Name=symbolList[0], Price=symbolList[1], Symbol=symbolList[2])
else:
return render_template("quote.html")
Here is the template:
{% extends "layout.html" %}
{% block title %}
Search for a stock
{% endblock %}
<main class="container p-5">
{% block main %}
<h1>Please Search Below</h1>
<pre>
<form action="/quote.html" method="post">
<input name="symbol" type="text">
<input type="submit">
</form>
</pre>
{% if name %}
<table>
<thead name="thead">
<tr>
<th>Name</th>
<th>Price</th>
<th>Symbol</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ Name }}</td>
<td>{{ Price }}</td>
<td>{{ Symbol }}</td>
</tr>
</tbody>
</table>
{% endif %}
{% endblock %}
</main>