Open byte-for-byte opened 3 years ago
Same question, it would be greate if we could get foreign keys as columns, may be somebody could give some tips or direction? Anyway, thanks @morlandi for such an eazy-to-use and great app!
Thank you @byte-for-byte for sharing your analisys.
I do understand this need; see also #22 issue which I wrote some time ago on the same subject.
Let's keep this issue open, hoping to receive a PR on this sooner or later (maybe by myself when time allows)
Hi, I just found this package: Thanks already for providing this awesome piece of work! I was wondering if I could use it for my 1-to-many situation though:
I have two Django models, Item and Prop. Each Item can have up to 2 related Prop objects where Prop.ptype isalways in ['P1', 'P2']. (In reality, there are many more Prop ptypes).
This situation in the database:
For all Item objects, I want to display a datatable of the following format:
I can do this by using:
However, if i want to have the prop columns searchable, this does not work any more since P1/P2/P3 are not part of the Item model. So I assume my approach is not good after all. I was looking into defining foreign_field entries in column_defs, but I do not see how this could we used to solve my problem.
Could somebody pls give me a pointer to the right direction?
TIA