To rewrite paging, you need to rewrite lib.html in the admin in the template. Paging is generated by the macro pager (page, pages, generator) among them
He accepts the total number of pages and the current number of pages, and accepts a generator to generate the url. The key is to rewrite the generator he accepts
Track the generation of paging through index_view. In index_view, when everything is ready, render will render the template and return. Among the parameters of render, there is one called pager_url, and generator refers to him
When excluding page 0, the real generator is _get_list_url, so just rewrite the _get_list_url method
To rewrite paging, you need to rewrite lib.html in the admin in the template. Paging is generated by the macro pager (page, pages, generator) among them
He accepts the total number of pages and the current number of pages, and accepts a generator to generate the url. The key is to rewrite the generator he accepts
Track the generation of paging through index_view. In index_view, when everything is ready, render will render the template and return. Among the parameters of render, there is one called pager_url, and generator refers to him
When excluding page 0, the real generator is _get_list_url, so just rewrite the _get_list_url method