source: waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py @ 105

Last change on this file since 105 was 103, checked in by joachim, 20 years ago

=accommodationhall

  • Property svn:keywords set to Id
File size: 9.9 KB
RevLine 
[47]1#-*- mode: python; mode: fold -*-
2# $Id: getWAeUPSchemas.py 103 2005-10-27 16:06:03Z joachim $
3
4university_schema = { ###(
[45]5}
[47]6###)
7
8students_folder_schema = { ###(
[45]9}
[47]10###)
11
12student_schema = { ###(
[19]13     'jamb_is_admitted': {
14        'type': 'CPS Boolean Field',
15        'data': {
16            'default_expr': 'python:False',
17            'is_searchabletext': 0,
18            'acl_read_permissions': '',
19            'acl_read_roles': '',
20            'acl_read_expr': '',
21            'acl_write_permissions': '',
22            'acl_write_roles': '',
23            'acl_write_expr': '',
24            'read_ignore_storage': False,
25            'read_process_expr': '',
26            'read_process_dependent_fields': (),
27            'write_ignore_storage': False,
28            'write_process_expr': '',
29        },
30    },
31    'faculty': {
32        'type': 'CPS String Field',
33        'data': {
34            'default_expr': 'string:',
35            'is_searchabletext': True,
36            'acl_read_permissions': '',
37            'acl_read_roles': '',
38            'acl_read_expr': '',
39            'acl_write_permissions': '',
40            'acl_write_roles': '',
41            'acl_write_expr': '',
42            'read_ignore_storage': False,
43            'read_process_expr': '',
44            'read_process_dependent_fields': (),
45            'write_ignore_storage': False,
46            'write_process_expr': '',
47        },
48    },
[47]49}
50#
51###)
52
53student_personal_schema = { ###(
54     'firstname': {
55        'type': 'CPS String Field',
56        'data': {
57            'is_searchabletext': 1,
58        },
[20]59    },
[47]60    'middlename': {
61        'type': 'CPS String Field',
62        'data': {
63            'is_searchabletext': 1,
64        },
65    },
66     'lastname': {
67        'type': 'CPS String Field',
68        'data': {
69            'is_searchabletext': 1,
70        },
71    },
72     'sex': {
73        'type': 'CPS Boolean Field',
[68]74        'default_expr': 'python:True',
[47]75        'data': {
76            'is_searchabletext': 1,
77        },
78    },
79     'birthday': {
80        'type': 'CPS DateTime Field',
81        'data': {
82            'is_searchabletext': 1,
83        },
84    },
[57]85     'age': {
86        'type': 'CPS DateTime Field',
87        'data': {
88            'is_searchabletext': 1,
89        },
90    },
91     'state': {
92        'type': 'CPS DateTime Field',
93        'data': {
94            'is_searchabletext': 1,
95        },
96    },
[19]97}
[47]98###)
99
100jamb_schema = { ###(
[19]101    'reg_nr': {
102        'type': 'CPS String Field',
103        'data': {
104            'default_expr': 'string:',
105            'is_searchabletext': True,
106        },
107    },
[47]108    'admission_sc_id': {
[19]109        'type': 'CPS String Field',
110        'data': {
111            'is_searchabletext': True,
112        },
113    },
[47]114    'admission_sc_pin': {
115        'type': 'CPS String Field',
[19]116        'data': {
[47]117            'is_searchabletext': True,
[19]118        },
119    },
[47]120    'admission_sc_pin_usage': {
121        'type': 'CPS Int Field',
[19]122        'data': {
[29]123            'default_expr': 'python:0',
[19]124            'is_searchabletext': False,
[57]125            },
126    },
127     'firstname': {
128        'type': 'CPS String Field',
129        'data': {
130            'is_searchabletext': 1,
[19]131        },
132    },
[57]133    'middlename': {
[19]134        'type': 'CPS String Field',
135        'data': {
[57]136            'is_searchabletext': 1,
[19]137        },
138    },
[57]139     'lastname': {
140        'type': 'CPS String Field',
141        'data': {
142            'is_searchabletext': 1,
143        },
144    },
[47]145    'age': {
146        'type': 'CPS Int Field',
[19]147        'data': {
[47]148            'default_expr': 'python:20',
149            'is_searchabletext': False,
[19]150        },
151    },
[47]152    'sex': {
153        'type': 'CPS Boolean Field',
[19]154        'data': {
[47]155            'default_expr': 'python:0',
[19]156            'is_searchabletext': False,
157        },
158    },
[57]159    'state': {
[19]160        'type': 'CPS String Field',
161        'data': {
162            'default_expr': 'string:',
[57]163            'is_searchabletext': False,
[19]164        },
165    },
[47]166    'exam_results': {
[19]167        'type': 'CPS String Field',
168        'data': {
169            'default_expr': 'string:',
170        },
171    },
[47]172    'aggregate': {
173        'type': 'CPS String Field',
[25]174        'data': {
[47]175            'default_expr': 'string:',
176            'is_searchabletext': False,
[25]177        },
[47]178    },
[57]179    'faculty': {
[25]180        'type': 'CPS String Field',
181        'data': {
[47]182            'default_expr': 'string:',
183            'is_searchabletext': False,
[25]184        },
185    },
[57]186    'listing_date': {
187        'type': 'CPS DateTime Field',
[25]188        'data': {
[57]189            'is_searchabletext': False,
[25]190        },
191    },
[57]192##    '2nd_choice': { ###(
193##        'type': 'CPS String Field',
194##        'data': {
195##            'default_expr': 'string:',
196##            'is_searchabletext': False,
197##            'acl_read_permissions': '',
198##            'acl_read_roles': '',
199##            'acl_read_expr': '',
200##            'acl_write_permissions': '',
201##            'acl_write_roles': '',
202##            'acl_write_expr': '',
203##            'read_ignore_storage': False,
204##            'read_process_expr': '',
205##            'read_process_dependent_fields': (),
206##            'write_ignore_storage': False,
207##            'write_process_expr': '',
208##        },
209##    },
210##    '3rd_choice': {
211##        'type': 'CPS String Field',
212##        'data': {
213##            'default_expr': 'string:',
214##            'is_searchabletext': True,
215##            'acl_read_permissions': '',
216##            'acl_read_roles': '',
217##            'acl_read_expr': '',
218##            'acl_write_permissions': '',
219##            'acl_write_roles': '',
220##            'acl_write_expr': '',
221##            'read_ignore_storage': False,
222##            'read_process_expr': '',
223##            'read_process_dependent_fields': (),
224##            'write_ignore_storage': False,
225##            'write_process_expr': '',
226##        },
227##    },
228###)
[25]229}
[47]230
[57]231
[47]232###)
233
[68]234faculty_schema = { ###(
235}###)
236
237department_schema = { ###(
238}###)
239
240course_schema = { ###(
[96]241    'heading': {
242        'type': 'CPS String Field',
243        'data': {
244            'default_expr': 'string:',
245            'is_searchabletext': True,
246        },
247    },
248    'text': {
249        'type': 'CPS String Field',
250        'data': {
251            'default_expr': 'string:',
252            'is_searchabletext': True,
253        },
254    },
[68]255    'level': {
256        'type': 'CPS String Field',
257        'data': {
258            'default_expr': 'string:',
259            'is_searchabletext': True,
260        },
261    },
262    'code': {
263        'type': 'CPS String Field',
264        'data': {
265            'default_expr': 'string:',
266            'is_searchabletext': True,
267        },
268    },
269    'semester': {
270        'type': 'CPS Boolean Field',
271        'data': {
272            'default_expr': 'python:True',
273            'is_searchabletext': False,
274        },
275    },
276    'credit': {
277        'type': 'CPS Int Field',
278        'data': {
279            'default_expr': 'string:',
280            'is_searchabletext': False,
281        },
282    },
283    'core_elective': {
284        'type': 'CPS Boolean Field',
285        'data': {
286            'default_expr': 'python:True',
287            'is_searchabletext': False,
288        },
289    },
290}###)
291
[103]292accommodation = { ###(
[101]293    'heading': {
294        'type': 'CPS String Field',
295        'data': {
296            'default_expr': 'string:',
297            'is_searchabletext': True,
298        },
299    },
300    'text': {
301        'type': 'CPS String Field',
302        'data': {
303            'default_expr': 'string:',
304            'is_searchabletext': True,
305        },
306    },
[103]307    'which_sex': {
308        'type': 'CPS Boolean Field',
[101]309        'data': {
310            'default_expr': 'string:',
311            'is_searchabletext': True,
312        },
313    },
[103]314    'nr_of_blocks': {
315        'type': 'CPS Int Field',
[101]316        'data': {
317            'default_expr': 'string:',
[103]318            'is_searchabletext': False,
[101]319        },
320    },
[103]321    'nr_of_floors': {
322        'type': 'CPS Int Field',
[101]323        'data': {
[103]324            'default_expr': 'string:',
[101]325            'is_searchabletext': False,
326        },
327    },
[103]328    'rooms_per_floor': {
[101]329        'type': 'CPS Int Field',
330        'data': {
331            'default_expr': 'string:',
332            'is_searchabletext': False,
333        },
334    },
[103]335    'beds_per_room': {
336        'type': 'CPS Int Field',
[101]337        'data': {
[103]338            'default_expr': 'string:',
[101]339            'is_searchabletext': False,
340        },
341    },
342}###)
343
[47]344##scratch_card = { ###(
345####   'allow_discussion': {
346####        'type': 'CPS Int Field',
347####        'data': {
348####            'default_expr': 'python:0',
349####            'is_searchabletext': 0,
350####            },
351####        },
352##     'sc_id': {
353##        'type': 'CPS String Field',
354##        'data': {
355##            'default_expr': '',
356##            'is_searchabletext': 0,
357##            'acl_read_permissions': '',
358##            'acl_read_roles': '',
359##            'acl_read_expr': '',
360##            'acl_write_permissions': '',
361##            'acl_write_roles': '',
362##            'acl_write_expr': '',
363##            'read_ignore_storage': False,
364##            'read_process_expr': '',
365##            'read_process_dependent_fields': (),
366##            'write_ignore_storage': False,
367##            'write_process_expr': '',
368##        },
369##    },
370##     'sc_pin': {
371##        'type': 'CPS String Field',
372##        'data': {
373##            'default_expr': '',
374##            'is_searchabletext': 0,
375##            'acl_read_permissions': '',
376##            'acl_read_roles': '',
377##            'acl_read_expr': '',
378##            'acl_write_permissions': '',
379##            'acl_write_roles': '',
380##            'acl_write_expr': '',
381##            'read_ignore_storage': False,
382##            'read_process_expr': '',
383##            'read_process_dependent_fields': (),
384##            'write_ignore_storage': False,
385##            'write_process_expr': '',
386##        },
387##    },
388##}
[19]389schemas = {}
[47]390###)
391
[45]392schemas['university'] = university_schema
393schemas['students'] = students_folder_schema
[19]394schemas['student'] = student_schema
[47]395schemas['student_personal'] = student_personal_schema
[103]396schemas['accommodation'] = accommodation
[19]397schemas['jamb'] = jamb_schema
[78]398#schemas['scratch_card'] = scratch_card
399schemas['faculty'] = faculty_schema
400schemas['department'] = department_schema
[68]401schemas['course'] = course_schema
[19]402
403return schemas
Note: See TracBrowser for help on using the repository browser.