Fixed admin pagination when limit is 0 by mitar · Pull Request #3990 · encode/django-rest-framework (original) (raw)
This is an alternative fix #3444.
It is a simpler fix because it simply forces limit to never be 0. By default, if limit is given as 0, then max_limit
is used as limit. But this can be changed in a subclass if somebody prefers to use default_limit
in such case as well.
This allows one to request a default limit (by not providing limit
query parameter) or request a max limit (by providing it with limit=0
as a query parameter).