Browse Source

ME: basic ME for tests

ArnAud 9 years ago
parent
commit
e85e19c4b1
2 changed files with 45 additions and 2 deletions
  1. 4
    0
      EditorialModel/model.py
  2. 41
    2
      EditorialModel/test/me.json

+ 4
- 0
EditorialModel/model.py View File

@@ -5,6 +5,8 @@
5 5
 
6 6
 from EditorialModel.classes import EmClass
7 7
 from EditorialModel.fieldgroups import EmFieldGroup
8
+from EditorialModel.fields import EmField
9
+from EditorialModel.types import EmType
8 10
 
9 11
 
10 12
 
@@ -13,6 +15,8 @@ class Model(object):
13 15
 
14 16
     componentClass = EmClass
15 17
     componentFieldGroup = EmFieldGroup
18
+    componentField = EmField
19
+    componentType = EmType
16 20
 
17 21
     ## Constructor
18 22
     #

+ 41
- 2
EditorialModel/test/me.json View File

@@ -3,9 +3,48 @@
3 3
     "component":"Class", "name":"textes", "string":"{\"fre\":\"Texte\"}", "help":"{}", "rank":"1", "date_update":"", "date_create":"", "classtype":"entity", "icon":"0", "sortcolumn":"rank"
4 4
   },
5 5
   "2" : {
6
-    "component":"Class", "name":"publications", "string":"{\"fre\":\"Rubriques\"}", "help":"{}", "rank":"1", "date_update":"", "date_create":"", "classtype":"entity", "icon":"0", "sortcolumn":"rank"
6
+    "component":"Class", "name":"personnes", "string":"{\"fre\":\"Gens\"}", "help":"{}", "rank":"1", "date_update":"", "date_create":"", "classtype":"person", "icon":"0", "sortcolumn":"rank"
7 7
   },
8 8
   "3" : {
9
-    "component":"FieldGroup", "name":"metadonne", "string":"{\"fre\":\"Rubriques\"}", "help":"{}", "rank":"1", "date_update":"", "date_create":"", "class_id":"1"
9
+    "component":"FieldGroup", "name":"info", "string":"{\"fre\":\"Info\"}", "help":"{}", "rank":"1", "date_update":"", "date_create":"", "class_id":"1"
10
+  },
11
+  "4" : {
12
+    "component":"Field", "name":"titre", "string":"{\"fre\":\"Titre\"}", "help":"{}", "rank":"1", "date_update":"", "date_create":"", "fieldtype":"", "fieldgroup_id":"3", "rel_to_type_id":"", "rel_field_id":"", "optional":"0", "internal":"", "icon":"0"
13
+  },
14
+  "5" : {
15
+    "component":"Type", "name":"article", "string":"{\"fre\":\"Article\"}", "help":"{}", "rank":"1", "date_update":"", "date_create":"", "class_id":"1", "icon":"0", "sortcolumn":"rank", "fields":[4,7]
16
+  },
17
+  "6" : {
18
+    "component":"Type", "name":"personne", "string":"{\"fre\":\"Personne\"}", "help":"{}", "rank":"1", "date_update":"", "date_create":"", "class_id":"2", "icon":"0", "sortcolumn":"rank", "fields":[9,10]
19
+  },
20
+  "7" : {
21
+    "component":"Field", "name":"soustitre", "string":"{\"fre\":\"Sous-titre\"}", "help":"{}", "rank":"2", "date_update":"", "date_create":"", "fieldtype":"", "fieldgroup_id":"3", "rel_to_type_id":"", "rel_field_id":"", "optional":"1", "internal":"", "icon":"0"
22
+  },
23
+  "8" : {
24
+    "component":"FieldGroup", "name":"civilité", "string":"{\"fre\":\"Civilité\"}", "help":"{}", "rank":"1", "date_update":"", "date_create":"", "class_id":"2"
25
+  },
26
+  "9" : {
27
+    "component":"Field", "name":"nom", "string":"{\"fre\":\"Nom\"}", "help":"{}", "rank":"1", "date_update":"", "date_create":"", "fieldtype":"", "fieldgroup_id":"8", "rel_to_type_id":"", "rel_field_id":"", "optional":"0", "internal":"", "icon":"0"
28
+  },
29
+  "10" : {
30
+    "component":"Field", "name":"prenom", "string":"{\"fre\":\"Preom\"}", "help":"{}", "rank":"2", "date_update":"", "date_create":"", "fieldtype":"", "fieldgroup_id":"8", "rel_to_type_id":"", "rel_field_id":"", "optional":"1", "internal":"", "icon":"0"
31
+  },
32
+  "11" : {
33
+    "component":"Field", "name":"auteur", "string":"{\"fre\":\"Auteur\"}", "help":"{}", "rank":"3", "date_update":"", "date_create":"", "fieldtype":"", "fieldgroup_id":"3", "rel_to_type_id":"6", "rel_field_id":"", "optional":"1", "internal":"", "icon":"0"
34
+  },
35
+  "12" : {
36
+    "component":"Field", "name":"adresse", "string":"{\"fre\":\"Adresse\"}", "help":"{}", "rank":"4", "date_update":"", "date_create":"", "fieldtype":"", "fieldgroup_id":"3", "rel_to_type_id":"", "rel_field_id":"11", "optional":"1", "internal":"", "icon":"0"
37
+  },
38
+  "13" : {
39
+    "component":"Class", "name":"publication", "string":"{\"fre\":\"Publication\"}", "help":"{}", "rank":"2", "date_update":"", "date_create":"", "classtype":"entity", "icon":"0", "sortcolumn":"rank", "subordinates":[5, 14]
40
+  },
41
+  "14" : {
42
+    "component":"Type", "name":"rubrique", "string":"{\"fre\":\"Rubrique\"}", "help":"{}", "rank":"1", "date_update":"", "date_create":"", "class_id":"13", "icon":"0", "sortcolumn":"rank"
43
+  },
44
+  "15" : {
45
+    "component":"FieldGroup", "name":"info", "string":"{\"fre\":\"Info\"}", "help":"{}", "rank":"1", "date_update":"", "date_create":"", "class_id":"13"
46
+  },
47
+  "16" : {
48
+    "component":"Field", "name":"titre", "string":"{\"fre\":\"Titre\"}", "help":"{}", "rank":"1", "date_update":"", "date_create":"", "fieldtype":"", "fieldgroup_id":"15", "rel_to_type_id":"", "rel_field_id":"", "optional":"0", "internal":"", "icon":"0"
10 49
   }
11 50
 }

Loading…
Cancel
Save