Set self.count before self.limit in LimitOffsetPagination
By doing this it is possible to override get_limit in order to return all records if the request has a predefined param. For example, if one wants that all records are retrieved if url has &limit=-1, get_limit could return self.count in this case. Otherwise, if self.count is set after self.limit then, to achive the same result, one has to override get_limit and paginate_queryset, or run get_limit twice.
Showing
Please
register
or
sign in
to comment