1๐
โ
If you want (1:N instead of N:1) to concatenate all related models in the table cell try to do this in your model layer by setting property, something like this:
class RepairDetail(models.Model):
# ...
@property
def service_reports_list(self):
return self.servicereport_set.all()
Define your own column (inherit tables.Column
) and override render
method
Add it to your table class:
class RepairDetailTable(tables.Table):
# ...
service_reports_list = YourOwnColumn(some_kwargs)
# ...
๐คmadzohan
Source:stackexchange.com