-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Use DRF 3.1 pagination_class
#3559
Conversation
This style corresponds to PR #3559
@ericholscher @agjohnson since we were talking that mixing style and logic PR is kind of tedious, I created another PR based on this where I ran Let me know if you like this approach. It a little tedious to make two different PR but I hope it simplies the review. |
I think, rather than fixing from the backend, this should be controlled by |
@safwanrahman good catch! I think it's a good idea. I'd like to fix the bug and make it work as it was working before since it could be other places that use that endpoint and may rely on that pagination size also. From #3251
Yes, we should think in a non-intrusive UI design for this. Most of the users won't have more than 25 organizations (in fact we have just one report of a person having 11 :) ). But anyway, I agree with both suggestions but I'd like to make them in different PR. If you agree with me, would you mind openning these two issues? Thanks! |
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.
Looks good to me for the immediate fix. We can let users set a page size in the future, but at least having working pagination is a good step :)
Might be useful to include a test, so that if it breaks again, we'll know.
Style using pre-commit
for _ in range(100): | ||
get(Project) | ||
|
||
resp = self.client.get('/api/v2/project/') |
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.
I think you can get the url by using reverse
. So it will be easier to manage in the future
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.
Looks good.
I have a minor correction, but its ok to ignore that and handle in future
Closes #3251