Add support for downloading batch rows as XLSX file

This commit is contained in:
Lance Edgar 2019-02-05 18:18:02 -06:00
parent 10c30cd21a
commit 6cfc72c875
3 changed files with 75 additions and 0 deletions

View file

@ -74,6 +74,7 @@ class BatchMasterView(MasterView):
has_rows = True
rows_deletable = True
rows_downloadable_csv = True
rows_downloadable_xlsx = True
refreshable = True
refresh_after_create = False
cloneable = False
@ -1333,6 +1334,9 @@ class BatchMasterView(MasterView):
def get_row_results_csv_filename(self, batch):
return '{}.{}.csv'.format(self.get_route_prefix(), batch.id_str)
def get_row_results_xlsx_filename(self, batch):
return '{}.{}.xlsx'.format(self.get_route_prefix(), batch.id_str)
def clone(self):
"""
Clone current batch as new batch