-
Notifications
You must be signed in to change notification settings - Fork 43
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
"Cannot reorder a query once a slice has been taken." - Pagination is not supported #2
Comments
I believe I've just run into this issue while using django-fluent-pages. Is there any way to work around it? |
You can set Clearly, I have to look into this issue pretty soon. |
Since the ModelAdmin is part of django-fluent-pages can you please provide direction on where I should set the I'll subclass your ModelAdmin and register it instead of the original, but which one should I be subclassing to add the |
Glad you've asked. This turned out to be a bit less intuitive then I thought.
UPDATE: I've just released a new version of django-polymorphic-tree which includes this workaround. FYI, The polymorhic admin is implemented by registering one class in the admin, and proxying the Fun fact: both that logic and this package were originally part of django-fluent-pages, and got split out or were upstreamed. |
The workaround is working good. Thanks! |
Due to the use of jqTree, the tree should start with root nodes only. This breaks with pagination, causing the error:
This happens because the
adminlist_recursetree
attempts to sort the tree onlft
value. To really fix this issue, the next page should start with the first root too. That could be implemented by using a custom paginator on the parent admin.The text was updated successfully, but these errors were encountered: