def register(self, model, **kwargs):
        """
        Register a model as a setting, adding it to the wagtail admin menu
        """

        # Don't bother registering this if it is already registered
        if model in self:
            return model
        self.append(model)

        # Register a new menu item in the settings menu
        @hooks.register('register_settings_menu_item')
        def menu_hook():
            return SettingMenuItem(model, **kwargs)

        @hooks.register('register_permissions')
        def permissions_hook():
            return Permission.objects.filter(
                content_type__app_label=model._meta.app_label,
                codename='change_{}'.format(model._meta.model_name))

        return model
dataset/ETHPy150Open torchbox/wagtail/wagtail/contrib/settings/registry.py/Registry.register/original