Skip to content
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

order_by / sort in listview #91

Open
A4TIF opened this issue Aug 23, 2018 · 5 comments
Open

order_by / sort in listview #91

A4TIF opened this issue Aug 23, 2018 · 5 comments

Comments

@A4TIF
Copy link
Contributor

A4TIF commented Aug 23, 2018

I believe this is going to be a feature request. I think we should have sorting/order_by for columns. This will be helpful for a lot of people I'm sure.

@A4TIF A4TIF changed the title Order / Sort in listview Order_by / Sort in listview Aug 23, 2018
@A4TIF A4TIF changed the title Order_by / Sort in listview order_by / sort in listview Aug 23, 2018
@luisza
Copy link
Contributor

luisza commented Aug 23, 2018

Hi, you can explain better this feature? What are you thinking about, how be show.
Thanks, maybe I can help to insert this feature.

@A4TIF
Copy link
Contributor Author

A4TIF commented Aug 23, 2018

Hi

Well I was thinking something like:
https://datatables.net/examples/styling/bootstrap.html

Just like how we have list_fields, list_filter=, we can include list_sorting= and enable sorting on those.

Currently, we can also override get_ordering, and allow fields ordering there, but then we need to make sure while paginating the request maintains the current ordering parameters, which it doesn't at the moment either. {{ getparams }} in pagination only takes care of the filters for now.

Basically once the ordering is enabled, we should show the "asc"/"desc" buttons on the columns and make it work somehow.

OR

We do something drastic, and really cool - DataTables with ajax :) That will super nice, and we can get rid of all the pagination / search code that we have now and use that instead. The challenge there will be with crud columns and perhaps a lot of other things.

Best of luck

@A4TIF
Copy link
Contributor Author

A4TIF commented Sep 1, 2018

Hi @luisza .. checking if you got working on this by any chance? I really feel if we can get rid of tables completely and just use divs, that will be really nice. Anyways, awaiting your response. If not, maybe for my next project with django-cruds-adminlte, I can do some modifications too.

@A4TIF
Copy link
Contributor Author

A4TIF commented Dec 17, 2018

Hi @luisza - just checking back on this .. any work done so far? I was looking at django_tables2 and it seems to have a good potential for this project. What do you reckon?

@luisza
Copy link
Contributor

luisza commented Dec 17, 2018

Hi, well sound like a good idea, I was working with admin2 and they use datatables2, I don't know if django_tables2 will be the option but maybe datatables2 plain and a rest API could help.

If I can do that, maybe we can remove some html code that are not responsive.
What do you think? @alegambo, @luisfelipe7, @GuillermoECS could you work on this in a week ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants