SPEAKER: For quote we have three to-dos.
We want to display the form for the user to look up the stock.
We want to then retrieve the quote for that stock.
And finally, display the current price for that stock.
So for the display form, let's make another template.
For instance, it can be called quote.HTML.
So this will include a form that allows them
to input the symbol of the stock the user wants to look up.
Once we have that symbol, let's use the VLOOKUP function.
Remember the implementation is found in helpers.py.
That will return a dict with the name, price, and symbol of that stock.
Now that we know how much the stock costs, let's tell the user.
To display this information let's create another template.
The reason for this is that the quote.HTML template that we've already
made includes the form submission, whereas this information is
going to be different.
So we'll only display the stock information
if the stock is, after all, valid.
Otherwise, include another apology.
So how do we pass on information and values that we have from a Python file
into HTML?
Well, when we call render a template we're allowed to pass in values.
So if I had a template called hello.HTML within my main blog,
then I could have a paragraph that simply said, "hello,"
and then had a placeholder for a name.
Note these two curly braces allow me to reference a Python value.
So within application.py, I would include a route to hello,
and I would return render template, hello.HTML, and passing
in the name "World."
So what would I see in HTML?
Well, it would replace name with "World!"
So my page would say, "Hello, World! " Now that we've displayed the quote,
let's go on and allow them to buy it if they decide that that stock is worth
it.