Allow opt-out for "download batch row data as CSV" feature
Sometimes that just confuses the issue, e.g. when the batch provides a download feature of its own.
This commit is contained in:
parent
e3f13baaab
commit
60c5d31aa1
|
@ -65,6 +65,7 @@ class BatchMasterView(MasterView):
|
||||||
"""
|
"""
|
||||||
has_rows = True
|
has_rows = True
|
||||||
rows_deletable = True
|
rows_deletable = True
|
||||||
|
rows_downloadable = True
|
||||||
refreshable = True
|
refreshable = True
|
||||||
|
|
||||||
def __init__(self, request):
|
def __init__(self, request):
|
||||||
|
@ -712,11 +713,12 @@ class BatchMasterView(MasterView):
|
||||||
"Execute {}".format(model_title))
|
"Execute {}".format(model_title))
|
||||||
|
|
||||||
# download rows as CSV
|
# download rows as CSV
|
||||||
config.add_route('{}.csv'.format(route_prefix), '{}/{{uuid}}/csv'.format(url_prefix))
|
if cls.rows_downloadable:
|
||||||
config.add_view(cls, attr='csv', route_name='{}.csv'.format(route_prefix),
|
config.add_route('{}.csv'.format(route_prefix), '{}/{{uuid}}/csv'.format(url_prefix))
|
||||||
permission='{}.csv'.format(permission_prefix))
|
config.add_view(cls, attr='csv', route_name='{}.csv'.format(route_prefix),
|
||||||
config.add_tailbone_permission(permission_prefix, '{}.csv'.format(permission_prefix),
|
permission='{}.csv'.format(permission_prefix))
|
||||||
"Download {} rows as CSV".format(model_title))
|
config.add_tailbone_permission(permission_prefix, '{}.csv'.format(permission_prefix),
|
||||||
|
"Download {} rows as CSV".format(model_title))
|
||||||
|
|
||||||
|
|
||||||
class FileBatchMasterView(BatchMasterView):
|
class FileBatchMasterView(BatchMasterView):
|
||||||
|
|
Loading…
Reference in a new issue