-
Notifications
You must be signed in to change notification settings - Fork 266
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
Queryset pagination order and verbosity #153
Conversation
@crazyscientist Are there any other changes that I should make? I would love to see this merged |
@DannyAziz To me the PR looks good now, but I have no permission to merge/accept. @sabricot What do you think? |
@safwanrahman can you take a look at this? order_by is really important when you have a big dataset. Adding order_by can be a good immediate step before a better approach, like #102 |
If the pk is not incremental integer, will this work? I have doubt that in the case the primary key is not integer, like uuid, it will work actually! |
@DannyAziz Can you rebase it upon master so its possible to merge? |
Thanks @ntcong for mentioning me here |
@safwanrahman I will rebase soon 👍 If you look at these 2 lines in my fork in this file:
It gets the name of the primary key for that model instead of assuming you are using PK, I am using UUID's in my project and it works fine |
@safwanrahman I've rebased the fork to master would love to see this merged 👍 |
My bad this needs some fixing, hold on... |
This looks good. r+ from my end |
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.
Awesome work. @DannyAziz
Added
.order_by('id')
as was getting inconsistent results after rebuilding the index as shown in #151Verbosity isn't important but I liked the feature in 'django-haystack'