For pset8 finance check 50 is showing errors stating
:( quote page has all required elements expected button to submit form, but none was found
The html template and source have a button element, and this looks exactly the same as the staff solution except for the placeholder text.
<form action="/quote" method="post"> <div class="form-group"> <input autocomplete="off" autofocus class="form-control" name="symbol" placeholder="Stock symbol" type="text"> </div> <button class="btn btn-primary" type="Submit">Quote</button> </form>
The buy form has a similar error showing in check50, but has a button and has similar html and template code.
Functionally everything works, and as far as I can see all elements are present.
The application.py code is
def quote(): """Get stock quote."""
# User reached route via POST (as by submitting a form via POST) if request.method == "POST": # Ensure stock symbol was submitted if not request.form.get("symbol"): return apology("must provide a stock symbol", 403) # Lookup stock price quote = lookup(request.form.get("symbol")) # Ensure symbol is a valid stock symbol if not quote: flash("Please enter a valid stock code") return redirect("/quote") # Convert price to show as USD quote['price'] = usd(quote['price']) # Redirect user to quoted page, passing the quote to the page. return render_template("quoted.html", quote=quote) # User reached route via GET (as by clicking a link or via redirect) else: return render_template("quote.html"), 200
Has anyone else experienced this, am I missing something really obvious?