I'm working through the Flask Mega Tutorial by Miguel Grinberg and I have an odd issue that I can't seen to figure out.
The blog is set up so you can have other users as followers. The /index page is supposed to list blog posts from your followers. You are supposed to be your own follower, so your blog posts should show up in /index and /user. My posts only show up in the /user page.
My repository of what I have already is here:
https://github.com/asdoylejr/microblog
From what I can tell everything I've done so far is line-for-line from the tutorial. I'm not sure why my test posts are listed in the /user view but not /index.
In the /index view, posts is defined as:
posts = g.user.followed_posts().paginate(page, POSTS_PER_PAGE, False)
But in the /user view, it's defined as:
posts = user.posts.paginate(page, POSTS_PER_PAGE, False)
If I change the /index posts variable to match /user, it returns an error.
Can anyone help me spot what I'm missing?
Thanks