1 00:00:00,000 --> 00:00:00,500 2 00:00:00,500 --> 00:00:03,600 ZAMYLA CHAN: Whenever a user logs into your website or makes a purchase, 3 00:00:03,600 --> 00:00:06,720 they're going to be redirected to a landing page. 4 00:00:06,720 --> 00:00:10,420 Let's edit that to reflect the user's portfolio. 5 00:00:10,420 --> 00:00:14,430 We'll want to display an HTML table with the user's portfolio-- that 6 00:00:14,430 --> 00:00:19,080 is, all of the stocks they own, all of the shares owned for that stock, 7 00:00:19,080 --> 00:00:25,020 the current price of that stock, and then the total value of each holding. 8 00:00:25,020 --> 00:00:27,450 We'll also want to display the user's current cash 9 00:00:27,450 --> 00:00:32,759 balance and the grand total of all of their cash and stocks. 10 00:00:32,759 --> 00:00:35,040 So that's a lot of information from our database 11 00:00:35,040 --> 00:00:36,900 that we're retrieving in Python. 12 00:00:36,900 --> 00:00:40,260 It's rows upon rows of information that we ultimately 13 00:00:40,260 --> 00:00:43,000 want to display in our HTML table. 14 00:00:43,000 --> 00:00:44,560 So how do we do that? 15 00:00:44,560 --> 00:00:48,360 Because we can't hard code the number of rows to insert. 16 00:00:48,360 --> 00:00:51,900 Here's where Jinja documentation will come in handy. 17 00:00:51,900 --> 00:00:53,880 Take a look at this for loop, which will allow 18 00:00:53,880 --> 00:00:58,830 me to iterate over every stock in the variable "stocks," printing out 19 00:00:58,830 --> 00:01:00,690 that stock's name. 20 00:01:00,690 --> 00:01:05,959 So think about which variables you need to pass in to index.html. 21 00:01:05,959 --> 00:01:07,592