Do not understand the Flask pagination error

recently, project development has encountered a very unreasonable problem. The problem reported is
werkzeug.routing.BuildError: Could not build url for endpoint "home.order".. Did you forget to specify values ["page"]?
looking at the error report, it is understandable that page.
is not specified, but this is the error that occurs when I modify per_page. For example, when I order page per _ page=5, I will not report an error. When I per_page=4 (22 items of data), I will not report an error normally, but click on page 6 to report the error above. What is even more outrageous is that when I per_page=1, I will report an error directly, and there is no way to access the first page. What is the problem?

Mar.30,2022

the main problem lies in the lack of proficiency in Flask pagination, in Flask pagination:

  20Noneiter_pages
:http://www.simplesay.xin/a-290.html

Today I took a look at the source code, you can refer to the article: https://codeshelper.com/a/11...

Menu