Calvin Goodale, Developer - Blog
c g o o d a a l e . . c o m

Pagination and other functionalities

Pagination is working for my Blog section, as of yesterday. It was pretty simple due to the paginate method in SQLAlchemy, and I just had to add a few lines of code as well as "Newer posts" and "Older posts" href in the html.

posts = Post.query.order_by(desc(Post.posted_on)).paginate(page, 5, False)

I also have a commenting functionality working in development and hope to deploy it this week. Flask is pretty enjoyable to use once you get over the initial hump of understanding its structure.


1 Comment:

nickybaby October 20, 2021
great job here!

New Flask website and Blog section

This week, I recreated my website using Python / Flask and added a Blog section. I'll be using this page to write about any projects I'm currently working on as a way of recording my progress as a developer.

Libraries / Methods I used:

  • SQLAlchemy for the database
  • Flask g for storing data during a request
  • Flask session for storing data between sessions

Next goals:

  • Improve the design of the Blog section
  • Allow comments on the Blog posts
  • Add a sidebar with post navigation
  • Add pagination


1 Comment:

Calvin October 21, 2021
This is a test comment, please ignore.