Replacing the pagination logic with the existing paginator templatetag