[PATCH 1 of 5 saem_ref] Import cubicweb-skos's schema using an alias

Denis Laxalde denis.laxalde at logilab.fr
Wed Feb 14 17:26:08 CET 2018


# HG changeset patch
# User Denis Laxalde <denis.laxalde at logilab.fr>
# Date 1518445423 -3600
#      Mon Feb 12 15:23:43 2018 +0100
# Node ID 0273830a2ec4013b37fd95b6499e32f1686e1c6e
# Parent  618addd3d4806ba219d3afc06f3f040ddb52c795
# Available At http://hg.logilab.org/review/cubes/saem_ref
#              hg pull http://hg.logilab.org/review/cubes/saem_ref -r 0273830a2ec4
# EXP-Topic ark/qualifiers
Import cubicweb-skos's schema using an alias

We'll need more definitions from this module and this
gets consistent with how other schema modules are imported.

diff --git a/cubicweb_saem_ref/schema.py b/cubicweb_saem_ref/schema.py
--- a/cubicweb_saem_ref/schema.py
+++ b/cubicweb_saem_ref/schema.py
@@ -25,7 +25,7 @@ from cubicweb.schema import (RO_ATTR_PER
                              make_workflowable)
 from cubicweb.schemas.base import ExternalUri, EmailAddress
 
-from cubes.skos.schema import ConceptScheme
+from cubes.skos import schema as skos
 from cubicweb_prov import schema as prov
 from cubicweb_eac import schema as eac
 from cubicweb_seda.schema import simplified_profile
@@ -130,10 +130,11 @@ for etype_def in (eac.ChronologicalRelat
     }
 
 
-# Customization of skos schema.
-make_workflowable(ConceptScheme)
-publication_permissions(ConceptScheme, groups=('managers',))
-ConceptScheme.__permissions__['add'] = ('managers',)
+# SKOS #########################################################################
+
+make_workflowable(skos.ConceptScheme)
+publication_permissions(skos.ConceptScheme, groups=('managers',))
+skos.ConceptScheme.__permissions__['add'] = ('managers',)
 
 
 class Organization(EntityType):



More information about the saem-devel mailing list