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

Last change on this file since 163 was 161, checked in by joachim, 19 years ago

=added Photo and birth_certificate in studentPersonal

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