Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Build a Social Network with Flask Broadcasting Post Model

Why are we adding this line

```def get_post(self): return Post.select().where(Post.user == self)

def get_stream(self):
    return Post.select().where( (Post.user = self)  )
Stephanie Weber
Stephanie Weber
16,657 Points

Post.select -> choose all the posts... where -> where Post.user = self -> the person who posted them was "me" (or the person using the service)

It's generating the posts/tweets that would be found on that user's profile page.

For example, it would be all the tweets on my Twitter page. Not where I look at what other people I follow have posted, the stuff that I have posted.

Hope that helps!