Python class to generate page numbers depending on the current page