-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Fix cursor pagination ordering #9816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
It was defined in testenv.deps for tox, which makes it a literal testing requirement The version requirement is copied from pyproject.toml
These filters are already applied by GenericAPIView.filter_queryset()
0053ad4 to
a8b6130
Compare
a8b6130 to
e03bd60
Compare
auvipy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be it would be better, if you link other relevant or somewhat relevant issues in the description
|
@auvipy I will do, but the PR needs some more serious work. It turned out, our cursor implementation makes heavy usage of "detect ordering from the view config & request" logic while completely ignoring the ordering provided by queryset or any other 3rd party, which makes it significantly harder to customize. I'm afraid the appropriate fix will need a partial rewrite of the cursor mechanism. |
Ok that's good to know. With what you learned trying this implementation/fix, do you feel like our docs are explaining this limitation well enough? If not, should we add a note/warning outlining it better? From what you wrote, it feels to me like a proper fix will take longer |
I'm not sure if we want to mention 3rd parties in that part of the docs but I think it would be better if something about django-filters ordering - CursorPagination incompatability mentioned in the docs. |
Resolves #9809