|
@@ -1,7 +1,9 @@
|
|
1
|
+#!/usr/bin/python3
|
1
|
2
|
#-*- coding: utf-8 -*-
|
2
|
3
|
|
3
|
|
-from lodel.settings.settings import Settings as SettingsHandler
|
4
|
|
-SettingsHandler('globconf.d')
|
|
4
|
+from lodel.settings.settings import Settings as settings
|
|
5
|
+settings('globconf.d')
|
|
6
|
+from lodel.settings import Settings
|
5
|
7
|
|
6
|
8
|
from lodel.editorial_model.components import *
|
7
|
9
|
from lodel.editorial_model.exceptions import *
|
|
@@ -204,14 +206,14 @@ section.new_field( 'childs',
|
204
|
206
|
display_name = 'Next section',
|
205
|
207
|
group = editorial_group,
|
206
|
208
|
data_handler = 'hierarch',
|
207
|
|
- allowed_class = [subsection],
|
|
209
|
+ allowed_classes = [subsection],
|
208
|
210
|
back_reference = ('subsection', 'parent'))
|
209
|
211
|
|
210
|
212
|
subsection.new_field( 'parent',
|
211
|
213
|
display_name = 'Parent',
|
212
|
214
|
group = editorial_group,
|
213
|
215
|
data_handler = 'link',
|
214
|
|
- allowed_class = [section])
|
|
216
|
+ allowed_classes = [section])
|
215
|
217
|
|
216
|
218
|
#####################
|
217
|
219
|
# Persons & authors #
|
|
@@ -286,4 +288,5 @@ text.new_field( 'linked_persons',
|
286
|
288
|
group = editorial_person_group,
|
287
|
289
|
)
|
288
|
290
|
|
|
291
|
+#em.save('xmlfile', filename = 'examples/em_test.xml')
|
289
|
292
|
em.save('picklefile', filename = 'examples/em_test.pickle')
|