-
Notifications
You must be signed in to change notification settings - Fork 8
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
Feature request: Rearrange order of objects in modeladmin index view #9
Comments
One approach to this would be to create an
From a UI/UX perspective, it'd make sense to match the page reordering approach as closely as possible. I haven't looked yet, but I'd expect there'd be some JS/styles that can be reused, or at least serve as a decent starting point to copy from. I'd be happy to work on a pull-request. |
What is the status of this ticket? I noticed PR is closed, but has actually not been merged. |
Hey @adriaant. The branch still exists here if you wanted to copy/paste for a project in the meantime: https://github.com/rkhleics/wagtail/tree/modeladmin/orderableadmin-2 I closed wagtail/wagtail#3103 because It didn't look like it was going to be reviewed any time soon, and there are a bunch of other issues that need addressing that would just introduce a bunch of merge conflicts for that wagtail/wagtail#3103. I'd rather just recreate the functionality later (with a bit less scope-creep) after having rebased everything on master. |
@ababic Understood, thanks for the quick and clear reply! |
This will be very nice addition to Wagtail. |
Is there any reason why this wasn't merged yet? This is a necessary feature for my org, we need to render the items on the FE in the order they appear on the admin interface. |
@inostia why what wasn't merged? This is an issue, not a PR. There was an associated PR, but that was closed for reasons outlined above. |
Good call @tomdyson, yes this is a GH issue. I was referring to the PR referenced in this thread, and the reason given for not merging that the original PR wasn't reviewed (as well as the apparent conflicts from the work), which led me to believe that this feature is not a high priority for the Wagtail team. I'd be happy to take a look at this (and @ababic's work) this weekend to see if I can contribute. If it's a super hairy issue I may end re-working requirements a bit, and attaching the |
For guys who requires this feature I created a package wagtail-orderable for that. Simply extends with the Most code are contributed by @ababic from this commit with minor modification for mainly versioning issue. Once again thanks for his contribution. |
@elton2048 thank you for taking the time to put wagtail-orderable together. I really feel a separate package is the best way to go here. Far easier to gather feedback and evolve things that way. |
Thank you @elton2048! This is awesome, will give it a try soon. |
In wagtail admin, it is possible to rearrange the order of pages in the admin editor. This is a feature that would work equally well for custom models managed via modeladmin, provided the models inherit the Orderable mixin. This is useful for pages that provide a list of all/filtered objects of a given model, but for which you want to provide the user with an option to define the order of the objects on the page.
For example:
A custom model for FAQ categories and a page that grabs the categories dynamically during rendering and displays them according to the order stored in the db. In other words, all the user has to do is create categories (and the contained questions) in the modeladmin interface.
Is this something already being considered or worth discussing?
The text was updated successfully, but these errors were encountered: