Description
If it's possible to have programatically-defined columns, that should be documented.
I don't think it is, and so far I haven't been able to achieve it anyway, so I am not sure if it's even possible, but if I have a couple of pointers I'll be happy to write it up in the documentation.
Example use case: A child has a height. But Child.height
alone perhaps isn't adequate, because children grow, so we might also have a model for Year
, and a through model that allows us to record a Child
's height for each Year
. In the table we'd therefore want a column for each Year
:
Child 1998 1999 2000
----------------------------
Eldest 155 162 170
Youngest 53 61 72
Middlest 80 91 103
It's possible to acquire both the Year
column headings and data by looping over attributes in the template, but that negates much of the convenience that has been afforded.