Browse Source

Added basic User class to the EM

Quentin Bonaventure 7 years ago
parent
commit
a33f1daaeb
1 changed files with 33 additions and 0 deletions
  1. 33
    0
      lodelsites_em.py

+ 33
- 0
lodelsites_em.py View File

@@ -61,6 +61,39 @@ em_lodel_site.new_field(
61 61
     data_handler = 'text',
62 62
 )
63 63
 
64
+
65
+
66
+
67
+user_group = em.new_group(
68
+    'users',
69
+    display_name = 'Lodel users',
70
+    help_text = 'Group that handle users en perm'
71
+)
72
+
73
+
74
+user = em.new_class(
75
+    'User',
76
+    group = user_group
77
+)
78
+
79
+user.new_field(
80
+    'login',
81
+    display_name = 'User login',
82
+    help_text = 'login',
83
+    group = user_group,
84
+    data_handler = 'varchar',
85
+    primary_key = True
86
+)
87
+
88
+user.new_field(
89
+    'password',
90
+    display_name = 'Password',
91
+    help_text = 'User password',
92
+    group = user_group,
93
+    data_handler = 'password',
94
+)
95
+
96
+
64 97
 pickle_file_path = 'examples/lodelsites_em.pickle'
65 98
 xml_file_path = 'examples/lodelsites_em.xml'
66 99
 

Loading…
Cancel
Save