diff --git a/tailbone/views/batch.py b/tailbone/views/batch.py index 39a9a742..15faed2a 100644 --- a/tailbone/views/batch.py +++ b/tailbone/views/batch.py @@ -65,6 +65,7 @@ class BatchMasterView(MasterView): """ has_rows = True rows_deletable = True + rows_downloadable = True refreshable = True def __init__(self, request): @@ -712,11 +713,12 @@ class BatchMasterView(MasterView): "Execute {}".format(model_title)) # download rows as CSV - config.add_route('{}.csv'.format(route_prefix), '{}/{{uuid}}/csv'.format(url_prefix)) - config.add_view(cls, attr='csv', route_name='{}.csv'.format(route_prefix), - permission='{}.csv'.format(permission_prefix)) - config.add_tailbone_permission(permission_prefix, '{}.csv'.format(permission_prefix), - "Download {} rows as CSV".format(model_title)) + if cls.rows_downloadable: + config.add_route('{}.csv'.format(route_prefix), '{}/{{uuid}}/csv'.format(url_prefix)) + config.add_view(cls, attr='csv', route_name='{}.csv'.format(route_prefix), + permission='{}.csv'.format(permission_prefix)) + config.add_tailbone_permission(permission_prefix, '{}.csv'.format(permission_prefix), + "Download {} rows as CSV".format(model_title)) class FileBatchMasterView(BatchMasterView):