flask-sqlalchemy icon indicating copy to clipboard operation
flask-sqlalchemy copied to clipboard

provide a `default_per_page` setting

Open wolvever opened this issue 7 months ago • 1 comments

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.

wolvever avatar Jul 23 '24 16:07 wolvever