Add basic master view for Report Output data model
This commit is contained in:
parent
e34bd947bc
commit
6adb99003d
3 changed files with 60 additions and 11 deletions
|
@ -56,6 +56,7 @@ class MasterView(View):
|
|||
deletable = True
|
||||
bulk_deletable = False
|
||||
mergeable = False
|
||||
downloadable = False
|
||||
|
||||
supports_mobile = False
|
||||
|
||||
|
@ -1456,6 +1457,14 @@ class MasterView(View):
|
|||
config.add_view(cls, attr='mobile_view', route_name='mobile.{}.view'.format(route_prefix),
|
||||
permission='{}.view'.format(permission_prefix))
|
||||
|
||||
# download
|
||||
if cls.downloadable:
|
||||
config.add_route('{}.download'.format(route_prefix), '{}/{{{}}}/download'.format(url_prefix, model_key))
|
||||
config.add_view(cls, attr='download', route_name='{}.download'.format(route_prefix),
|
||||
permission='{}.download'.format(permission_prefix))
|
||||
config.add_tailbone_permission(permission_prefix, '{}.download'.format(permission_prefix),
|
||||
"Download associated data for {}".format(model_title))
|
||||
|
||||
# edit
|
||||
if cls.editable:
|
||||
config.add_route('{0}.edit'.format(route_prefix), '{0}/{{{1}}}/edit'.format(url_prefix, model_key))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue