Skip to content

Conversation

@jamesrkiger
Copy link
Owner

@jamesrkiger jamesrkiger commented Dec 6, 2023

Fixes vitalik#547

This PR adds support for async pagination and updates existing pagination classes to work with async pagination. The _inject_pagination function now checks to see if the view function is async and then, if so, adds view_with_pagination as an async function that calls an apaginate_queryset method expected in the new AsyncPaginationBase. The async view_with_pagination also forces async evaluation of the results queryset if necessary.

@jamesrkiger jamesrkiger marked this pull request as draft December 6, 2023 19:49
@jamesrkiger jamesrkiger marked this pull request as ready for review December 29, 2023 19:44
@jamesrkiger jamesrkiger merged commit 22dc055 into master Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] TypeError: 'coroutine' object is not subscriptable [async pagination]

2 participants