Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed A Social Network with Flask!
You have completed A Social Network with Flask!
Preview
Since users can post updates, we should make views to handle showing the updates.
Pagination docs
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
logged in, and of course, you saw just a
single user's messages on their page.
0:00
So, let's copy that.
0:02
Okay, so let's build our homepage.
0:03
So let's come back over here, and we have
our index route that we've so
0:07
far done really nothing with.
0:10
All right.
0:12
So, on the index page, we need to get the
stream.
0:13
We need to get stuff.
0:16
So let's say, stream, our stream of posts
is models.Post.select,
0:17
and I'm gonna set a limit of a 100.
0:22
If we, say this was insanely popular and
0:25
we had 5 million posts, we wouldn't want
to select all of them.
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up