flask report : flask pagination 1

Опубликовано: 09 Май 2026
на канале: Naim Mhedhbi
34
0

If you have a lot of results, you may only want to show a certain number at a time, allowing the user to click next and previous links to see pages of data. This is sometimes called pagination, and uses the verb paginate.

Call SQLAlchemy.paginate() on a select statement to get a Pagination object.

During a request, this will take page and per_page arguments from the query string request.args. Pass max_per_page to prevent users from requesting too many results on a single page. If not given, the default values will be page 1 with 20 items per page.