-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Apply LimitOffsetPagination in GET Infraction with default Page Size 100 #443
Apply LimitOffsetPagination in GET Infraction with default Page Size 100 #443
Conversation
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.
Hello, thank you for your contribution! There are a couple of things that needs to be reverted.
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.
Changes have been done as discussed. Please review the changes.
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.
This works fine and I will approve it. However, I've left some more minor suggestions to clean up the documentation and make it more consistent.
pydis_site/apps/api/pagination.py
Outdated
{ | ||
"count": 1, | ||
"next": null, | ||
"previous": null, | ||
"results": [{ | ||
"id": 6, | ||
"inserted_at": "2021-01-26T21:13:35.477879Z", | ||
"expires_at": null, | ||
"active": false, | ||
"user": 1, | ||
"actor": 2, | ||
"type": "warning", | ||
"reason": null, | ||
"hidden": false | ||
}] | ||
} | ||
## Required response | ||
[{ | ||
"id": 6, | ||
"inserted_at": "2021-01-26T21:13:35.477879Z", | ||
"expires_at": null, | ||
"active": false, | ||
"user": 1, | ||
"actor": 2, | ||
"type": "warning", | ||
"reason": null, | ||
"hidden": false | ||
}] |
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.
For consistency, ideally these would be formatted like the docs for viewsets. They are formatted as if they were copied from a Python REPL. They are also not indented consistently.
Co-authored-by: Mark <kozlovmark@gmail.com>
Co-authored-by: Mark <kozlovmark@gmail.com>
Co-authored-by: Mark <kozlovmark@gmail.com>
Co-authored-by: Mark <kozlovmark@gmail.com>
Co-authored-by: Mark <kozlovmark@gmail.com>
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.
Thanks a lot for the PR, this works very nicely!
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.
Refresh
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.
Approving in place of @Akarys42
Add Default Pagination class LimitOffsetPagination with Page Size 100 in GET Infraction