Closed PetrDlouhy closed 3 years ago
Thank you @PetrDlouhy, I'll manage this together with Issue #20, soon ;)
The logic for customize_row
has been inherited from the original app I started this project from: https://github.com/monnierj/django-datatables-server-side
I agree it's not the most natural solution for a Django app.
Thank you @PetrDlouhy for your interesting contribution. Before publishing a new release, I'll try to extend it to cope with a sequence of fields to be used for column sorting, since I have a specific practical use case in mind for this
@PetrDlouhy on second thought, I opted to publish a new release v4.1.7 with your PR, and write an issue #22 for allowing multiple sorting on each column.
The required modifications should be easy, but the project is rather limited in terms of unit tests, so I need to have some real data available for the specific use case to test them
This PR allows to set sorting by different column, than the 'name' column. I made this partially because I misunderstood how make custom content in the columns - i expected similar behavior to Django ModeAdmin, and I used
@property
methods on model and this (similarily toadmin_order_field
). I rewrote my code withcustomize_row
, so I don't need it anymore.But anyway, it might still be useful for somebody in some situations.