SPEAKER 1: Once a user makes a purchase, they'll
be redirected to the index page.
So, let's edit that to reflect the user's portfolio.
In this display for index, we'll want to show an HTML table that
shows the user's portfolio, the stocks that they own,
the shares of each stock that they own, the current price of each stock,
and the total value of each holding that they have.
In addition to that, we'll want to show the user's current cash balance, as
well as the grand total of their value.
So, the cash plus all of the value of their shares.
That's a lot of information from the database, and retrieving that will all
be done in Python, so we'll have rows upon rows of information
that we'll then want to display in HTML.
But how do we do that without including lines and lines for every single row
that we have?
Well, luckily there's documentation within Ginga that allows us to do this.
Take this for loop, for example.
Say within the Python file I've called render template
and passed in an array of stocks.
Well, then this for loop allows me to iterate over
every single stock in stocks, and will display the stock name.
So, think of which variables you need to pass into index.html,
and what information you need to show.