order_columns doesn't work with foreign keys

Issue #5 resolved
David Barbour created an issue

This commit fixed rendering of columns based on a parent model's field:

https://bitbucket.org/pigletto/django-datatables-view/pull-request/3/columns-may-reference-foreign-keys/diff

But order_columns still can't pull from foreign keys. You get the following error:

"DataTables warning: table id=ProductTable - (1054, "Unknown column 'parent.parent_attr' in 'order clause'")"

Comments (4)

  1. Terence Lew

    Fpreign keys also do not seem to play well with searching/filtering by DataTables. Would raise alert: "DataTables warning: table id=XXX - Related Field got invalid lookup: istartswithRelated Field got invalid lookup: istartswith"

  2. Log in to comment