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,6 +713,7 @@ class BatchMasterView(MasterView):
|
||||||
"Execute {}".format(model_title))
|
"Execute {}".format(model_title))
|
||||||
|
|
||||||
# download rows as CSV
|
# download rows as CSV
|
||||||
|
if cls.rows_downloadable:
|
||||||
config.add_route('{}.csv'.format(route_prefix), '{}/{{uuid}}/csv'.format(url_prefix))
|
config.add_route('{}.csv'.format(route_prefix), '{}/{{uuid}}/csv'.format(url_prefix))
|
||||||
config.add_view(cls, attr='csv', route_name='{}.csv'.format(route_prefix),
|
config.add_view(cls, attr='csv', route_name='{}.csv'.format(route_prefix),
|
||||||
permission='{}.csv'.format(permission_prefix))
|
permission='{}.csv'.format(permission_prefix))
|
||||||
|
|
Loading…
Reference in a new issue