@classmethod
def _defaults(cls, config):
    """
        Provide default configuration for a master view.
        """
    rattail_config = config.registry.settings.get('rattail_config')
    route_prefix = cls.get_route_prefix()
    url_prefix = cls.get_url_prefix()
    instance_url_prefix = cls.get_instance_url_prefix()
    permission_prefix = cls.get_permission_prefix()
    model_key = cls.get_model_key()
    model_title = cls.get_model_title()
    model_title_plural = cls.get_model_title_plural()
    if cls.has_rows:
        row_model_title = cls.get_row_model_title()
    legacy_mobile = cls.legacy_mobile_enabled(rattail_config)
    config.add_tailbone_permission_group(permission_prefix,
        model_title_plural, overwrite=False)
    if cls.listable:
        config.add_tailbone_permission(permission_prefix, '{}.list'.format(
            permission_prefix), 'List / search {}'.format(model_title_plural))
        config.add_route(route_prefix, '{}/'.format(url_prefix))
        config.add_view(cls, attr='index', route_name=route_prefix,
            permission='{}.list'.format(permission_prefix))
        if legacy_mobile and cls.supports_mobile:
            config.add_route('mobile.{}'.format(route_prefix), '/mobile{}/'
                .format(url_prefix))
            config.add_view(cls, attr='mobile_index', route_name=
                'mobile.{}'.format(route_prefix), permission='{}.list'.
                format(permission_prefix))
        if cls.results_downloadable_csv:
            config.add_tailbone_permission(permission_prefix,
                '{}.results_csv'.format(permission_prefix),
                'Download {} as CSV'.format(model_title_plural))
            config.add_route('{}.results_csv'.format(route_prefix),
                '{}/csv'.format(url_prefix))
            config.add_view(cls, attr='results_csv', route_name=
                '{}.results_csv'.format(route_prefix), permission=
                '{}.results_csv'.format(permission_prefix))
        if cls.results_downloadable_xlsx:
            config.add_tailbone_permission(permission_prefix,
                '{}.results_xlsx'.format(permission_prefix),
                'Download {} as XLSX'.format(model_title_plural))
            config.add_route('{}.results_xlsx'.format(route_prefix),
                '{}/xlsx'.format(url_prefix))
            config.add_view(cls, attr='results_xlsx', route_name=
                '{}.results_xlsx'.format(route_prefix), permission=
                '{}.results_xlsx'.format(permission_prefix))
    if cls.supports_quickie_search:
        config.add_tailbone_permission(permission_prefix, '{}.quickie'.
            format(permission_prefix), 'Do a "quickie search" for {}'.
            format(model_title_plural))
        config.add_route('{}.quickie'.format(route_prefix), '{}/quickie'.
            format(route_prefix), request_method='GET')
        config.add_view(cls, attr='quickie', route_name='{}.quickie'.format
            (route_prefix), permission='{}.quickie'.format(permission_prefix))
    if cls.creatable or legacy_mobile and cls.mobile_creatable:
        config.add_tailbone_permission(permission_prefix, '{}.create'.
            format(permission_prefix), 'Create new {}'.format(model_title))
    if cls.creatable:
        config.add_route('{}.create'.format(route_prefix), '{}/new'.format(
            url_prefix))
        config.add_view(cls, attr='create', route_name='{}.create'.format(
            route_prefix), permission='{}.create'.format(permission_prefix))
    if legacy_mobile and cls.mobile_creatable:
        config.add_route('mobile.{}.create'.format(route_prefix),
            '/mobile{}/new'.format(url_prefix))
        config.add_view(cls, attr='mobile_create', route_name=
            'mobile.{}.create'.format(route_prefix), permission='{}.create'
            .format(permission_prefix))
    if cls.populatable:
        config.add_route('{}.populate'.format(route_prefix),
            '{}/{{uuid}}/populate'.format(url_prefix))
        config.add_view(cls, attr='populate', route_name='{}.populate'.
            format(route_prefix), permission='{}.create'.format(
            permission_prefix))
    if cls.supports_set_enabled_toggle:
        config.add_tailbone_permission(permission_prefix,
            '{}.enable_disable_set'.format(permission_prefix),
            'Enable / disable set (selection) of {}'.format(model_title_plural)
            )
        config.add_route('{}.enable_set'.format(route_prefix),
            '{}/enable-set'.format(url_prefix), request_method='POST')
        config.add_view(cls, attr='enable_set', route_name='{}.enable_set'.
            format(route_prefix), permission='{}.enable_disable_set'.format
            (permission_prefix))
        config.add_route('{}.disable_set'.format(route_prefix),
            '{}/disable-set'.format(url_prefix), request_method='POST')
        config.add_view(cls, attr='disable_set', route_name=
            '{}.disable_set'.format(route_prefix), permission=
            '{}.enable_disable_set'.format(permission_prefix))
    if cls.set_deletable:
        config.add_tailbone_permission(permission_prefix, '{}.delete_set'.
            format(permission_prefix), 'Delete set (selection) of {}'.
            format(model_title_plural))
        config.add_route('{}.delete_set'.format(route_prefix),
            '{}/delete-set'.format(url_prefix), request_method='POST')
        config.add_view(cls, attr='delete_set', route_name='{}.delete_set'.
            format(route_prefix), permission='{}.delete_set'.format(
            permission_prefix))
    if cls.bulk_deletable:
        config.add_route('{}.bulk_delete'.format(route_prefix),
            '{}/bulk-delete'.format(url_prefix), request_method='POST')
        config.add_view(cls, attr='bulk_delete', route_name=
            '{}.bulk_delete'.format(route_prefix), permission=
            '{}.bulk_delete'.format(permission_prefix))
        config.add_tailbone_permission(permission_prefix, '{}.bulk_delete'.
            format(permission_prefix), 'Bulk delete {}'.format(
            model_title_plural))
    if cls.mergeable:
        config.add_route('{}.merge'.format(route_prefix), '{}/merge'.format
            (url_prefix))
        config.add_view(cls, attr='merge', route_name='{}.merge'.format(
            route_prefix), permission='{}.merge'.format(permission_prefix))
        config.add_tailbone_permission(permission_prefix, '{}.merge'.format
            (permission_prefix), 'Merge 2 {}'.format(model_title_plural))
    if cls.viewable:
        config.add_tailbone_permission(permission_prefix, '{}.view'.format(
            permission_prefix), 'View details for {}'.format(model_title))
        if cls.has_pk_fields:
            config.add_tailbone_permission(permission_prefix,
                '{}.view_pk_fields'.format(permission_prefix),
                'View all PK-type fields for {}'.format(model_title_plural))
        if cls.secure_global_objects:
            config.add_tailbone_permission(permission_prefix,
                '{}.view_global'.format(permission_prefix),
                'View *global* {}'.format(model_title_plural))
        config.add_route('{}.view_index'.format(route_prefix), '{}/view'.
            format(url_prefix))
        config.add_view(cls, attr='view_index', route_name='{}.view_index'.
            format(route_prefix), permission='{}.view'.format(
            permission_prefix))
        config.add_route('{}.view'.format(route_prefix), instance_url_prefix)
        config.add_view(cls, attr='view', route_name='{}.view'.format(
            route_prefix), permission='{}.view'.format(permission_prefix))
        if legacy_mobile and cls.supports_mobile:
            config.add_route('mobile.{}.view'.format(route_prefix),
                '/mobile{}'.format(instance_url_prefix))
            config.add_view(cls, attr='mobile_view', route_name=
                'mobile.{}.view'.format(route_prefix), permission='{}.view'
                .format(permission_prefix))
        if (cls.has_versions and rattail_config and rattail_config.
            versioning_enabled()):
            config.add_tailbone_permission(permission_prefix, '{}.versions'
                .format(permission_prefix), 'View version history for {}'.
                format(model_title))
            config.add_route('{}.versions'.format(route_prefix),
                '{}/versions/'.format(instance_url_prefix))
            config.add_view(cls, attr='versions', route_name='{}.versions'.
                format(route_prefix), permission='{}.versions'.format(
                permission_prefix))
            config.add_route('{}.version'.format(route_prefix),
                '{}/versions/{{txnid}}'.format(instance_url_prefix))
            config.add_view(cls, attr='view_version', route_name=
                '{}.version'.format(route_prefix), permission='{}.versions'
                .format(permission_prefix))
    if cls.has_image:
        config.add_route('{}.image'.format(route_prefix), '{}/image'.format
            (instance_url_prefix))
        config.add_view(cls, attr='image', route_name='{}.image'.format(
            route_prefix), permission='{}.view'.format(permission_prefix))
    if cls.has_thumbnail:
        config.add_route('{}.thumbnail'.format(route_prefix),
            '{}/thumbnail'.format(instance_url_prefix))
        config.add_view(cls, attr='thumbnail', route_name='{}.thumbnail'.
            format(route_prefix), permission='{}.view'.format(
            permission_prefix))
    if cls.cloneable:
        config.add_tailbone_permission(permission_prefix, '{}.clone'.format
            (permission_prefix), 'Clone an existing {0} as a new {0}'.
            format(model_title))
        config.add_route('{}.clone'.format(route_prefix), '{}/clone'.format
            (instance_url_prefix))
        config.add_view(cls, attr='clone', route_name='{}.clone'.format(
            route_prefix), permission='{}.clone'.format(permission_prefix))
    if cls.touchable:
        config.add_tailbone_permission(permission_prefix, '{}.touch'.format
            (permission_prefix), '"Touch" a {} to trigger datasync for it'.
            format(model_title))
        config.add_route('{}.touch'.format(route_prefix), '{}/touch'.format
            (instance_url_prefix))
        config.add_view(cls, attr='touch', route_name='{}.touch'.format(
            route_prefix), permission='{}.touch'.format(permission_prefix))
    if cls.downloadable:
        config.add_route('{}.download'.format(route_prefix), '{}/download'.
            format(instance_url_prefix))
        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))
    if cls.editable or legacy_mobile and cls.mobile_editable:
        config.add_tailbone_permission(permission_prefix, '{}.edit'.format(
            permission_prefix), 'Edit {}'.format(model_title))
    if cls.editable:
        config.add_route('{}.edit'.format(route_prefix), '{}/edit'.format(
            instance_url_prefix))
        config.add_view(cls, attr='edit', route_name='{}.edit'.format(
            route_prefix), permission='{}.edit'.format(permission_prefix))
    if legacy_mobile and cls.mobile_editable:
        config.add_route('mobile.{}.edit'.format(route_prefix),
            '/mobile{}/edit'.format(instance_url_prefix))
        config.add_view(cls, attr='mobile_edit', route_name=
            'mobile.{}.edit'.format(route_prefix), permission='{}.edit'.
            format(permission_prefix))
    if cls.executable or legacy_mobile and cls.mobile_executable:
        config.add_tailbone_permission(permission_prefix, '{}.execute'.
            format(permission_prefix), 'Execute {}'.format(model_title))
    if cls.executable:
        config.add_route('{}.execute'.format(route_prefix), '{}/execute'.
            format(instance_url_prefix))
        config.add_view(cls, attr='execute', route_name='{}.execute'.format
            (route_prefix), permission='{}.execute'.format(permission_prefix))
    if legacy_mobile and cls.mobile_executable:
        config.add_route('mobile.{}.execute'.format(route_prefix),
            '/mobile{}/execute'.format(instance_url_prefix))
        config.add_view(cls, attr='mobile_execute', route_name=
            'mobile.{}.execute'.format(route_prefix), permission=
            '{}.execute'.format(permission_prefix))
    if cls.deletable:
        config.add_route('{0}.delete'.format(route_prefix), '{}/delete'.
            format(instance_url_prefix))
        config.add_view(cls, attr='delete', route_name='{0}.delete'.format(
            route_prefix), permission='{0}.delete'.format(permission_prefix))
        config.add_tailbone_permission(permission_prefix, '{0}.delete'.
            format(permission_prefix), 'Delete {0}'.format(model_title))
    if cls.supports_import_batch_from_file:
        config.add_tailbone_permission(permission_prefix, '{}.import_file'.
            format(permission_prefix),
            'Create a new import batch from data file')
    if cls.has_rows and cls.rows_downloadable_csv:
        config.add_tailbone_permission(permission_prefix,
            '{}.row_results_csv'.format(permission_prefix),
            'Download {} results as CSV'.format(row_model_title))
        config.add_route('{}.row_results_csv'.format(route_prefix),
            '{}/{{uuid}}/rows-csv'.format(url_prefix))
        config.add_view(cls, attr='row_results_csv', route_name=
            '{}.row_results_csv'.format(route_prefix), permission=
            '{}.row_results_csv'.format(permission_prefix))
    if cls.has_rows and cls.rows_downloadable_xlsx:
        config.add_tailbone_permission(permission_prefix,
            '{}.row_results_xlsx'.format(permission_prefix),
            'Download {} results as XLSX'.format(row_model_title))
        config.add_route('{}.row_results_xlsx'.format(route_prefix),
            '{}/{{uuid}}/rows-xlsx'.format(url_prefix))
        config.add_view(cls, attr='row_results_xlsx', route_name=
            '{}.row_results_xlsx'.format(route_prefix), permission=
            '{}.row_results_xlsx'.format(permission_prefix))
    if cls.has_rows:
        if cls.rows_creatable or legacy_mobile and cls.mobile_rows_creatable:
            config.add_tailbone_permission(permission_prefix,
                '{}.create_row'.format(permission_prefix),
                'Create new {} rows'.format(model_title))
        if cls.rows_creatable:
            config.add_route('{}.create_row'.format(route_prefix),
                '{}/new-row'.format(instance_url_prefix))
            config.add_view(cls, attr='create_row', route_name=
                '{}.create_row'.format(route_prefix), permission=
                '{}.create_row'.format(permission_prefix))
        if legacy_mobile and cls.mobile_rows_creatable:
            config.add_route('mobile.{}.create_row'.format(route_prefix),
                '/mobile{}/new-row'.format(instance_url_prefix))
            config.add_view(cls, attr='mobile_create_row', route_name=
                'mobile.{}.create_row'.format(route_prefix), permission=
                '{}.create_row'.format(permission_prefix))
            if cls.mobile_rows_quickable:
                config.add_route('mobile.{}.quick_row'.format(route_prefix),
                    '/mobile{}/quick-row'.format(instance_url_prefix))
                config.add_view(cls, attr='mobile_quick_row', route_name=
                    'mobile.{}.quick_row'.format(route_prefix), permission=
                    '{}.create_row'.format(permission_prefix))
    if cls.has_rows:
        if cls.rows_viewable:
            config.add_route('{}.view_row'.format(route_prefix),
                '{}/{{uuid}}/rows/{{row_uuid}}'.format(url_prefix))
            config.add_view(cls, attr='view_row', route_name='{}.view_row'.
                format(route_prefix), permission='{}.view'.format(
                permission_prefix))
        if legacy_mobile and cls.mobile_rows_viewable:
            config.add_route('mobile.{}.view_row'.format(route_prefix),
                '/mobile{}/{{uuid}}/rows/{{row_uuid}}'.format(url_prefix))
            config.add_view(cls, attr='mobile_view_row', route_name=
                'mobile.{}.view_row'.format(route_prefix), permission=
                '{}.view'.format(permission_prefix))
    if cls.has_rows:
        if cls.rows_editable or legacy_mobile and cls.mobile_rows_editable:
            config.add_tailbone_permission(permission_prefix, '{}.edit_row'
                .format(permission_prefix), 'Edit individual {} rows'.
                format(model_title))
        if cls.rows_editable:
            config.add_route('{}.edit_row'.format(route_prefix),
                '{}/{{uuid}}/rows/{{row_uuid}}/edit'.format(url_prefix))
            config.add_view(cls, attr='edit_row', route_name='{}.edit_row'.
                format(route_prefix), permission='{}.edit_row'.format(
                permission_prefix))
        if legacy_mobile and cls.mobile_rows_editable:
            config.add_route('mobile.{}.edit_row'.format(route_prefix),
                '/mobile{}/{{uuid}}/rows/{{row_uuid}}/edit'.format(url_prefix))
            config.add_view(cls, attr='mobile_edit_row', route_name=
                'mobile.{}.edit_row'.format(route_prefix), permission=
                '{}.edit_row'.format(permission_prefix))
    if cls.has_rows:
        if cls.rows_deletable or legacy_mobile and cls.mobile_rows_deletable:
            config.add_tailbone_permission(permission_prefix,
                '{}.delete_row'.format(permission_prefix),
                'Delete individual {} rows'.format(model_title))
        if cls.rows_deletable:
            config.add_route('{}.delete_row'.format(route_prefix),
                '{}/{{uuid}}/rows/{{row_uuid}}/delete'.format(url_prefix))
            config.add_view(cls, attr='delete_row', route_name=
                '{}.delete_row'.format(route_prefix), permission=
                '{}.delete_row'.format(permission_prefix))
        if legacy_mobile and cls.mobile_rows_deletable:
            config.add_route('mobile.{}.delete_row'.format(route_prefix),
                '/mobile{}/{{uuid}}/rows/{{row_uuid}}/delete'.format(
                url_prefix))
            config.add_view(cls, attr='mobile_delete_row', route_name=
                'mobile.{}.delete_row'.format(route_prefix), permission=
                '{}.delete_row'.format(permission_prefix))
