Fix the "Last" page link in the search results.
Review Request #11675 — Created June 25, 2021 and submitted — Latest diff uploaded
Haystack removed a template context variable we used to grab the last
page number, for the "Last" page link in the paginator. This change
fixes that anchor.It also fixes up the view code to use the modern version of
range()
,
to ensure consistency across Python 2.7 and 3.x.Unit tests were added to ensure this doesn't regress in the future.
Verified that search results render and include all the right links
on Python 2.x and 3.x.Unit tests passed.