def previous_page(): post = Post() if pagination_info["to"] < post.count(): pagination_info["from"] += 5 pagination_info["to"] += 5