diff --git a/tailbone/views/master.py b/tailbone/views/master.py index 640da516..06f8f34d 100644 --- a/tailbone/views/master.py +++ b/tailbone/views/master.py @@ -50,6 +50,7 @@ class MasterView(View): pageable = True checkboxes = False + listable = True creatable = True viewable = True editable = True @@ -1114,11 +1115,12 @@ class MasterView(View): config.add_tailbone_permission_group(permission_prefix, model_title_plural, overwrite=False) # list/search - config.add_route(route_prefix, '{0}/'.format(url_prefix)) - config.add_view(cls, attr='index', route_name=route_prefix, - permission='{0}.list'.format(permission_prefix)) - config.add_tailbone_permission(permission_prefix, '{0}.list'.format(permission_prefix), - "List/Search {0}".format(model_title_plural)) + if cls.listable: + config.add_route(route_prefix, '{}/'.format(url_prefix)) + config.add_view(cls, attr='index', route_name=route_prefix, + permission='{}.list'.format(permission_prefix)) + config.add_tailbone_permission(permission_prefix, '{}.list'.format(permission_prefix), + "List / search {}".format(model_title_plural)) # create if cls.creatable: @@ -1131,7 +1133,7 @@ class MasterView(View): # view if cls.viewable: config.add_tailbone_permission(permission_prefix, '{}.view'.format(permission_prefix), - "View {} details".format(model_title)) + "View details for {}".format(model_title)) # view by grid index config.add_route('{}.view_index'.format(route_prefix), '{}/view'.format(url_prefix))