Is there a way to get the sum of values of a column which contains computed values? I tried rendering the footer following the documentation and a question here, but without results.
EDIT:
class BillsColumn(Column):
def render(self, record):
bills = record.certificatebills.all()
total_bill = 0
for bill in bills:
total_bill += bill.bill_amount
return(round(total_bill, 2))
def render_footer(self, bound_column, table):
column_values = sum(columns_somehow)
return column_values
This is the custom column I'm using. It returns the sum of certificate bills of of each certificate and then shows it in the Column. I don't know how to access this computed value in the render_footer method.