More options:
``columns`` support model traversing
And
``format_row`` hook called on each row to do tidy up the results
class TimeSeriesWithoutGroupBy(SlickReportView):
report_model = SalesLineTransaction
date_field = 'transaction_date'
columns = ['transaction_date', 'client__name', 'product__name', 'quantity', 'price', 'value']
def format_row(self, row_obj):
"""
A hook to format each row . This method gets called on each row in the results.
:param row_obj: a dict representing a single row in the results
:return: A dict representing a single row in the results
"""
row_obj['transaction_date'] = date(row_obj['transaction_date'], 'd-m-y H:i')
return row_obj