flask-sqlalchemy
flask-sqlalchemy copied to clipboard
provide a `default_per_page` setting
In this code https://github.com/pallets-eco/flask-sqlalchemy/blob/main/src/flask_sqlalchemy/pagination.py#L132
When per_page = 0, it will be set to 20 if error_out = False.
if per_page < 1:
if error_out:
abort(404)
else:
per_page = 20
20 might not be the case for all scenarioes, better give it a configurable value.