In the matter of fact, this can't be done. if TemplateColumn name is based on name in model, sorting works fine. As far as I am concerned If you want present other data it is impossible.
Django-tables2 Sorting TemplateColumn
-
05-08-2022 - |
Question
Is it somehow possible, to add custom sort method to values generated using TemplateColumn? because on basic it tries to find column name in model and returns FieldError: Cannot resolve keyword u'coulmn_name' into field. Choices are: [all fields in model]
.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow