Browse Source

Inheritance of MlNamedObject

prieto 8 years ago
parent
commit
3abf402cfb
2 changed files with 5 additions and 3 deletions
  1. 3
    2
      lodel/editorial_model/components.py
  2. 2
    1
      lodel/editorial_model/model.py

+ 3
- 2
lodel/editorial_model/components.py View File

@@ -12,6 +12,7 @@ import hashlib
12 12
 from lodel.context import LodelContext
13 13
 LodelContext.expose_modules(globals(), {
14 14
     'lodel.utils.mlstring': ['MlString'],
15
+    'lodel.mlnamedobject': ['MlNamedObject'],
15 16
     'lodel.settings': ['Settings'],
16 17
     'lodel.editorial_model.exceptions': ['EditorialModelError', 'assert_edit'],
17 18
     'lodel.leapi.leobject': ['CLASS_ID_FIELDNAME']})
@@ -20,7 +21,7 @@ LodelContext.expose_modules(globals(), {
20 21
 # @see EmClass EmField
21 22
 # @todo forbid '.' in uid
22 23
 #@ingroup lodel2_em
23
-class EmComponent(object):
24
+class EmComponent(MlNamedObject):
24 25
     
25 26
     ##@brief Instanciate an EmComponent
26 27
     # @param uid str : uniq identifier
@@ -268,7 +269,7 @@ class EmField(EmComponent):
268 269
 
269 270
 ##@brief Handles functionnal group of EmComponents
270 271
 #@ingroup lodel2_em
271
-class EmGroup(object):
272
+class EmGroup(MlNamedObject):
272 273
         
273 274
     ##@brief Create a new EmGroup
274 275
     # @note you should NEVER call the constructor yourself. Use Model.add_group instead

+ 2
- 1
lodel/editorial_model/model.py View File

@@ -7,6 +7,7 @@ import copy
7 7
 from lodel.context import LodelContext
8 8
 LodelContext.expose_modules(globals(), {
9 9
     'lodel.utils.mlstring': ['MlString'],
10
+    'lodel.mlnamedobject': ['MlNamedObject'],
10 11
     'lodel.logger': 'logger',
11 12
     'lodel.settings': ['Settings'],
12 13
     'lodel.settings.utils': ['SettingsError'],
@@ -16,7 +17,7 @@ LodelContext.expose_modules(globals(), {
16 17
 
17 18
 ##@brief Describe an editorial model
18 19
 #@ingroup lodel2_em
19
-class EditorialModel(object):
20
+class EditorialModel(MlNamedObject):
20 21
     
21 22
     ##@brief Create a new editorial model
22 23
     # @param name MlString|str|dict : the editorial model name

Loading…
Cancel
Save