Lookup function always returns "None". Weirdly the same code produced correct results yesterday but as of today it stopped. Any thoughts why? The code for the quoted.html and application.py is below:
{% extends "layout.html" %}
{% block title %}
Quote
{% endblock %}
{% block main %}
A share of {{ qt.name }} {{ qt.symbol }} costs {{ qt.price }}
{% endblock %}
@app.route("/quote", methods=["GET", "POST"])
@login_required
def quote():
if request.method == "GET":
return render_template("quote.html")
else:
qt = lookup(request.form.get("symbol"))
print(qt)
if qt != None:
return render_template("quoted.html", qt=qt)
else:
return apology("Must enter valid symbol")