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

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

=email add, Faculty + Department Title removed

  • Property svn:keywords set to Id
File size: 23.3 KB
Line 
1#-*- mode: python; mode: fold -*-
2# $Id: getWAeUPSchemas.py 176 2005-11-16 07:52:57Z joachim $
3
4sc_id = { ###(
5        'type': 'CPS String Field',
6        'data': {
7            'default_expr': 'string:',
8            'is_searchabletext': True,
9            'acl_read_permissions': '',
10            'acl_read_roles': '',
11            'acl_read_expr': '',
12            'acl_write_permissions': '',
13            'acl_write_roles': 'SectionReader',
14            'acl_write_expr': '',
15            'read_ignore_storage': False,
16            'read_process_expr': '',
17            'read_process_dependent_fields': (),
18            'write_ignore_storage': False,
19            'write_process_expr': '',
20            },
21        }
22###)
23
24sc_pin = { ###(
25        'type': 'CPS String Field',
26        'data': {
27            'default_expr': 'string:',
28            'is_searchabletext': True,
29            'acl_read_permissions': '',
30            'acl_read_roles': '',
31            'acl_read_expr': '',
32            'acl_write_permissions': '',
33            'acl_write_roles': 'SectionReader',
34            'acl_write_expr': '',
35            'read_ignore_storage': False,
36            'read_process_expr': '',
37            'read_process_dependent_fields': (),
38            'write_ignore_storage': False,
39            'write_process_expr': '',
40            },
41        }
42       
43###)
44
45sc_value = { ###(
46        'type': 'CPS Float Field',
47        'data': {
48            'default_expr': 'python:0.',
49            'is_searchabletext': True,
50            'acl_read_permissions': '',
51            'acl_read_roles': '',
52            'acl_read_expr': '',
53            'acl_write_permissions': '',
54            'acl_write_roles': '',
55            'acl_write_expr': '',
56            'read_ignore_storage': False,
57            'read_process_expr': '',
58            'read_process_dependent_fields': (),
59            'write_ignore_storage': False,
60            'write_process_expr': '',
61            },
62        }
63###)
64sc_date = { ###(
65        'type': 'CPS DateTime Field',
66        'data': {
67            'default_expr': 'python:500.',
68            'is_searchabletext': True,
69            'acl_read_permissions': '',
70            'acl_read_roles': '',
71            'acl_read_expr': '',
72            'acl_write_permissions': '',
73            'acl_write_roles': '',
74            'acl_write_expr': '',
75            'read_ignore_storage': False,
76            'read_process_expr': '',
77            'read_process_dependent_fields': (),
78            'write_ignore_storage': False,
79            'write_process_expr': '',
80            },
81        }
82###)
83
84university_schema = { ###(
85}
86###)
87
88students_folder_schema = { ###(
89}
90###)
91
92academics_folder_schema = { ###(
93}
94###)
95
96student_schema = { ###(
97     'jamb_is_admitted': {
98        'type': 'CPS Boolean Field',
99        'data': {
100            'default_expr': 'python:False',
101            'is_searchabletext': 0,
102            'acl_read_permissions': '',
103            'acl_read_roles': '',
104            'acl_read_expr': '',
105            'acl_write_permissions': '',
106            'acl_write_roles': '',
107            'acl_write_expr': '',
108            'read_ignore_storage': False,
109            'read_process_expr': '',
110            'read_process_dependent_fields': (),
111            'write_ignore_storage': False,
112            'write_process_expr': '',
113        },
114    },
115    'faculty': {
116        'type': 'CPS String Field',
117        'data': {
118            'default_expr': 'string:',
119            'is_searchabletext': True,
120            'acl_read_permissions': '',
121            'acl_read_roles': '',
122            'acl_read_expr': '',
123            'acl_write_permissions': '',
124            'acl_write_roles': '',
125            'acl_write_expr': '',
126            'read_ignore_storage': False,
127            'read_process_expr': '',
128            'read_process_dependent_fields': (),
129            'write_ignore_storage': False,
130            'write_process_expr': '',
131        },
132    },
133    'course': {
134        'type': 'CPS String Field',
135        'data': {
136            'default_expr': 'string:',
137            'is_searchabletext': True,
138            'acl_read_permissions': '',
139            'acl_read_roles': '',
140            'acl_read_expr': '',
141            'acl_write_permissions': '',
142            'acl_write_roles': '',
143            'acl_write_expr': '',
144            'read_ignore_storage': False,
145            'read_process_expr': '',
146            'read_process_dependent_fields': (),
147            'write_ignore_storage': False,
148            'write_process_expr': '',
149             },
150        },
151    'adm_check_sc_id' : sc_id,
152    'adm_check_sc_pin' : sc_pin,
153    'adm_check_sc_value' : sc_value,
154    'adm_check_date' : {
155        'type': 'CPS DateTime Field',
156        'data': {
157            'is_searchabletext': 0,
158        },
159    },
160    'clearance_sc_id' : sc_id,
161    'clearance_sc_pin' : sc_pin,
162    'clearance_sc_value' : sc_value,
163    'clearance_date' : {
164        'type': 'CPS DateTime Field',
165        'data': {
166            'is_searchabletext': 0,
167            'acl_write_roles': 'SectionReader',
168        },
169    },
170    'accommodation' : { ###(
171        'type': 'CPS String Field',
172        'data': {
173            'default_expr': 'string:',
174            'is_searchabletext': True,
175            'acl_read_permissions': '',
176            'acl_read_roles': '',
177            'acl_read_expr': '',
178            'acl_write_permissions': '',
179            'acl_write_roles': '',
180            'acl_write_expr': '',
181            'read_ignore_storage': False,
182            'read_process_expr': '',
183            'read_process_dependent_fields': (),
184            'write_ignore_storage': False,
185            'write_process_expr': '',
186             },
187        }, ###)
188    'accommodation_sc_id' : sc_id,
189    'accommodation_sc_pin' : sc_pin,
190    'accommodation_sc_value' : sc_value,
191    'accommodation_date' : {
192        'type': 'CPS DateTime Field',
193        'data': {
194            'is_searchabletext': 0,
195            'acl_write_roles': 'SectionReader',
196        },
197    },
198    'hostel_fee_sc_id' : sc_id,
199    'hostel_fee_sc_pin' : sc_pin,
200    'hostel_fee_sc_value' : sc_value,
201    'hostel_fee_date' : {
202        'type': 'CPS DateTime Field',
203        'data': {
204            'is_searchabletext': 0,
205            'acl_write_roles': 'SectionReader',
206        },
207    },
208}
209###)
210
211student_accommodation = { ###(
212    'sc_id': sc_id,
213    'sc_pin': sc_pin,
214    'sc_value': { ###(
215        'type': 'CPS Float Field',
216        'data': {
217            'default_expr': 'python:500.',
218            'is_searchabletext': True,
219            'acl_read_permissions': '',
220            'acl_read_roles': '',
221            'acl_read_expr': '',
222            'acl_write_permissions': '',
223            'acl_write_roles': '',
224            'acl_write_expr': '',
225            'read_ignore_storage': False,
226            'read_process_expr': '',
227            'read_process_dependent_fields': (),
228            'write_ignore_storage': False,
229            'write_process_expr': '',
230            },
231        },###)
232    'accommodation': {
233        'type': 'CPS String Field',
234        'data': {
235            'default_expr': 'string:',
236            'is_searchabletext': True,
237            'acl_read_permissions': '',
238            'acl_read_roles': '',
239            'acl_read_expr': '',
240            'acl_write_permissions': '',
241            'acl_write_roles': '',
242            'acl_write_expr': '',
243            'read_ignore_storage': False,
244            'read_process_expr': '',
245            'read_process_dependent_fields': (),
246            'write_ignore_storage': False,
247            'write_process_expr': '',
248             },
249        },
250}
251###)
252
253student_hostel_fee = { ###(
254    'sc_id': sc_id,
255    'sc_pin': sc_pin,
256    'sc_value': { ###(
257        'type': 'CPS Float Field',
258        'data': {
259            'default_expr': 'python:2500.',
260            'is_searchabletext': True,
261            'acl_read_permissions': '',
262            'acl_read_roles': '',
263            'acl_read_expr': '',
264            'acl_write_permissions': '',
265            'acl_write_roles': '',
266            'acl_write_expr': '',
267            'read_ignore_storage': False,
268            'read_process_expr': '',
269            'read_process_dependent_fields': (),
270            'write_ignore_storage': False,
271            'write_process_expr': '',
272            },
273        },###)
274    'accommodation': {
275        'type': 'CPS String Field',
276        'data': {
277            'default_expr': 'string:',
278            'is_searchabletext': True,
279            'acl_read_permissions': '',
280            'acl_read_roles': '',
281            'acl_read_expr': '',
282            'acl_write_permissions': '',
283            'acl_write_roles': '',
284            'acl_write_expr': '',
285            'read_ignore_storage': False,
286            'read_process_expr': '',
287            'read_process_dependent_fields': (),
288            'write_ignore_storage': False,
289            'write_process_expr': '',
290             },
291        },
292}
293###)
294
295student_admission = { ###(
296    'sc_id': sc_id,
297    'sc_pin': sc_pin,
298    'sc_value': { ###(
299        'type': 'CPS Float Field',
300        'data': {
301            'default_expr': 'python:300.',
302            'is_searchabletext': True,
303            'acl_read_permissions': '',
304            'acl_read_roles': '',
305            'acl_read_expr': '',
306            'acl_write_permissions': '',
307            'acl_write_roles': '',
308            'acl_write_expr': '',
309            'read_ignore_storage': False,
310            'read_process_expr': '',
311            'read_process_dependent_fields': (),
312            'write_ignore_storage': False,
313            'write_process_expr': '',
314            },
315        },###)
316    'reg_nr': {
317        'type': 'CPS String Field',
318        'data': {
319            'default_expr': 'string:',
320            'is_searchabletext': True,
321        },
322    },
323}
324###)
325
326student_clearance = { ###(
327    'sc_id': sc_id,
328    'sc_pin': sc_pin,
329    'sc_value': { ###(
330        'type': 'CPS Float Field',
331        'data': {
332            'default_expr': 'python:800.',
333            'is_searchabletext': True,
334            'acl_read_permissions': '',
335            'acl_read_roles': '',
336            'acl_read_expr': '',
337            'acl_write_permissions': '',
338            'acl_write_roles': '',
339            'acl_write_expr': '',
340            'read_ignore_storage': False,
341            'read_process_expr': '',
342            'read_process_dependent_fields': (),
343            'write_ignore_storage': False,
344            'write_process_expr': '',
345            },
346        },###)
347    'reg_nr': {
348        'type': 'CPS String Field',
349        'data': {
350            'default_expr': 'string:',
351            'is_searchabletext': True,
352        },
353    },
354    'lastname': {
355        'type': 'CPS String Field',
356        'data': {
357            'default_expr': 'string:',
358            'is_searchabletext': True,
359            'acl_read_permissions': '',
360            'acl_read_roles': '',
361            'acl_read_expr': '',
362            'acl_write_permissions': '',
363            'acl_write_roles': '',
364            'acl_write_expr': '',
365            'read_ignore_storage': False,
366            'read_process_expr': '',
367            'read_process_dependent_fields': (),
368            'write_ignore_storage': False,
369            'write_process_expr': '',
370             },
371        },
372}###)
373
374study_level = { ###(
375    'sc_id': sc_id,
376    'sc_pin': sc_pin,
377    'sc_value': { ###(
378        'type': 'CPS Float Field',
379        'data': {
380            'default_expr': 'python:1000.',
381            'is_searchabletext': True,
382            'acl_read_permissions': '',
383            'acl_read_roles': '',
384            'acl_read_expr': '',
385            'acl_write_permissions': '',
386            'acl_write_roles': '',
387            'acl_write_expr': '',
388            'read_ignore_storage': False,
389            'read_process_expr': '',
390            'read_process_dependent_fields': (),
391            'write_ignore_storage': False,
392            'write_process_expr': '',
393            },
394        },###)
395}
396###)
397
398student_personal_schema = { ###(
399     'firstname': {
400        'type': 'CPS String Field',
401        'data': {
402            'is_searchabletext': 1,
403        },
404    },
405    'middlename': {
406        'type': 'CPS String Field',
407        'data': {
408            'is_searchabletext': 1,
409        },
410    },
411     'lastname': {
412        'type': 'CPS String Field',
413        'data': {
414            'is_searchabletext': 1,
415        },
416    },
417     'email': {
418        'type': 'CPS String Field',
419        'data': {
420            'is_searchabletext': 1,
421        },
422    },
423     'sex': {
424        'type': 'CPS Boolean Field',
425        'default_expr': 'python:True',
426        'data': {
427            'is_searchabletext': 0,
428        },
429    },
430     'birthday': {
431        'type': 'CPS DateTime Field',
432        'data': {
433            'is_searchabletext': 0,
434        },
435    },
436     'age': {
437        'type': 'CPS DateTime Field',
438        'data': {
439            'is_searchabletext': 0,
440        },
441    },
442}
443###)
444
445student_documents = { ###(
446     'photo': {
447        'type': 'CPS Image Field',
448        'data': {
449            'is_searchabletext': 0,
450        },
451    },
452     'birth_certificate': {
453        'type': 'CPS Image Field',
454        'data': {
455            'is_searchabletext': 0,
456        },
457    },
458     'passport': {
459        'type': 'CPS Image Field',
460        'data': {
461            'is_searchabletext': 0,
462        },
463    },
464     'results_first': {
465        'type': 'CPS Image Field',
466        'data': {
467            'is_searchabletext': 0,
468        },
469    },
470     'results_second': {
471        'type': 'CPS Image Field',
472        'data': {
473            'is_searchabletext': 0,
474        },
475    },
476}
477###)
478
479student_eligibility = { ###(
480     'firstname': {
481        'type': 'CPS String Field',
482        'data': {
483            'is_searchabletext': 1,
484        },
485    },
486    'middlename': {
487        'type': 'CPS String Field',
488        'data': {
489            'is_searchabletext': 1,
490        },
491    },
492     'lastname': {
493        'type': 'CPS String Field',
494        'data': {
495            'is_searchabletext': 1,
496        },
497    },
498     'username': {
499        'type': 'CPS String Field',
500        'data': {
501            'is_searchabletext': 0,
502        },
503    },
504     'sex': {
505        'type': 'CPS Boolean Field',
506        'default_expr': 'python:True',
507        'data': {
508            'is_searchabletext': 0,
509        },
510    },
511##     'birthday': {
512##        'type': 'CPS DateTime Field',
513##        'data': {
514##            'is_searchabletext': 1,
515##        },
516##    },
517     'age': {
518        'type': 'CPS DateTime Field',
519        'data': {
520            'is_searchabletext': 0,
521        },
522    },
523    'email': {
524        'type': 'CPS String Field',
525        'data': {
526            'is_searchabletext': 1,
527        },
528    },
529    'pw': {
530        'type': 'CPS String Field',
531        'data': {
532            'default_expr': 'string:default',
533        },
534    },
535    'rpw': {
536        'type': 'CPS String Field',
537        'data': {
538            'default_expr': 'string:default',
539        },
540    },
541##     'photo': {
542##        'type': 'CPS Image Field',
543##        'data': {
544##            'is_searchabletext': 0,
545##        },
546##    },
547##     'birth_certificate': {
548##        'type': 'CPS Image Field',
549##        'data': {
550##            'is_searchabletext': 0,
551##        },
552##    },
553}
554###)
555
556jamb_schema = { ###(
557    'reg_nr': {
558        'type': 'CPS String Field',
559        'data': {
560            'default_expr': 'string:',
561            'is_searchabletext': True,
562        },
563    },
564    'admission_sc_id': {
565        'type': 'CPS String Field',
566        'data': {
567            'is_searchabletext': True,
568        },
569    },
570    'admission_sc_pin': {
571        'type': 'CPS String Field',
572        'data': {
573            'is_searchabletext': True,
574        },
575    },
576    'admission_sc_pin_usage': {
577        'type': 'CPS Int Field',
578        'data': {
579            'default_expr': 'python:0',
580            'is_searchabletext': False,
581            },
582    },
583     'firstname': {
584        'type': 'CPS String Field',
585        'data': {
586            'is_searchabletext': 1,
587        },
588    },
589    'middlename': {
590        'type': 'CPS String Field',
591        'data': {
592            'is_searchabletext': 1,
593        },
594    },
595     'lastname': {
596        'type': 'CPS String Field',
597        'data': {
598            'is_searchabletext': 1,
599        },
600    },
601    'age': {
602        'type': 'CPS Int Field',
603        'data': {
604            'default_expr': 'python:20',
605            'is_searchabletext': False,
606        },
607    },
608    'sex': {
609        'type': 'CPS Boolean Field',
610        'data': {
611            'default_expr': 'python:0',
612            'is_searchabletext': False,
613        },
614    },
615    'state': {
616        'type': 'CPS String Field',
617        'data': {
618            'default_expr': 'string:',
619            'is_searchabletext': False,
620        },
621    },
622    'exam_results': {
623        'type': 'CPS String Field',
624        'data': {
625            'default_expr': 'string:',
626        },
627    },
628    'aggregate': {
629        'type': 'CPS String Field',
630        'data': {
631            'default_expr': 'string:',
632            'is_searchabletext': False,
633        },
634    },
635    'faculty': {
636        'type': 'CPS String Field',
637        'data': {
638            'default_expr': 'string:',
639            'is_searchabletext': False,
640        },
641    },
642    'course': {
643        'type': 'CPS String Field',
644        'data': {
645            'default_expr': 'string:',
646            'is_searchabletext': False,
647        },
648    },
649    'listing_date': {
650        'type': 'CPS DateTime Field',
651        'data': {
652            'is_searchabletext': False,
653        },
654    },
655##    '2nd_choice': { ###(
656##        'type': 'CPS String Field',
657##        'data': {
658##            'default_expr': 'string:',
659##            'is_searchabletext': False,
660##            'acl_read_permissions': '',
661##            'acl_read_roles': '',
662##            'acl_read_expr': '',
663##            'acl_write_permissions': '',
664##            'acl_write_roles': '',
665##            'acl_write_expr': '',
666##            'read_ignore_storage': False,
667##            'read_process_expr': '',
668##            'read_process_dependent_fields': (),
669##            'write_ignore_storage': False,
670##            'write_process_expr': '',
671##        },
672##    },
673##    '3rd_choice': {
674##        'type': 'CPS String Field',
675##        'data': {
676##            'default_expr': 'string:',
677##            'is_searchabletext': True,
678##            'acl_read_permissions': '',
679##            'acl_read_roles': '',
680##            'acl_read_expr': '',
681##            'acl_write_permissions': '',
682##            'acl_write_roles': '',
683##            'acl_write_expr': '',
684##            'read_ignore_storage': False,
685##            'read_process_expr': '',
686##            'read_process_dependent_fields': (),
687##            'write_ignore_storage': False,
688##            'write_process_expr': '',
689##        },
690##    },
691###)
692}
693
694
695###)
696
697course_results_schema = { ###(
698     'points': {
699        'type': 'CPS Int Field',
700        'data': {
701            'is_searchabletext': 0,
702        },
703    },
704     'grade': {
705        'type': 'CPS String Field',
706        'data': {
707            'is_searchabletext': 0,
708        },
709    },
710}
711#
712###)
713
714faculty_schema = { ###(
715}###)
716
717department_schema = { ###(
718}###)
719
720course_schema = { ###(
721##    'Title': {
722##        'type': 'CPS String Field',
723##        'data': {
724##            'default_expr': '',
725##            'is_searchabletext': True,
726##        },
727##    },
728    'heading': {
729        'type': 'CPS String Field',
730        'data': {
731            'is_searchabletext': True,
732        },
733    },
734    'text': {
735        'type': 'CPS String Field',
736        'data': {
737            'is_searchabletext': True,
738        },
739    },
740    'level': {
741        'type': 'CPS String Field',
742        'data': {
743            'default_expr': 'string:',
744            'is_searchabletext': True,
745        },
746    },
747    'code': {
748        'type': 'CPS String Field',
749        'data': {
750            'default_expr': 'string:',
751            'is_searchabletext': True,
752        },
753    },
754    'semester': {
755        'type': 'CPS Boolean Field',
756        'data': {
757            'default_expr': 'python:True',
758            'is_searchabletext': False,
759        },
760    },
761    'credit': {
762        'type': 'CPS Int Field',
763        'data': {
764            'default_expr': 'string:',
765            'is_searchabletext': False,
766        },
767    },
768    'core_elective': {
769        'type': 'CPS Boolean Field',
770        'data': {
771            'default_expr': 'python:True',
772            'is_searchabletext': False,
773        },
774    },
775}###)
776
777accommodation = { ###(
778    'heading': {
779        'type': 'CPS String Field',
780        'data': {
781            'is_searchabletext': True,
782        },
783    },
784    'text': {
785        'type': 'CPS String Field',
786        'data': {
787            'is_searchabletext': True,
788        },
789    },
790    'which_sex': {
791        'type': 'CPS Boolean Field',
792        'data': {
793            'is_searchabletext': True,
794        },
795    },
796    'nr_of_blocks': {
797        'type': 'CPS Int Field',
798        'data': {
799            'is_searchabletext': False,
800        },
801    },
802    'nr_of_floors': {
803        'type': 'CPS Int Field',
804        'data': {
805            'is_searchabletext': False,
806        },
807    },
808    'rooms_per_floor': {
809        'type': 'CPS Int Field',
810        'data': {
811            'is_searchabletext': False,
812        },
813    },
814    'beds_per_room': {
815        'type': 'CPS Int Field',
816        'data': {
817            'is_searchabletext': False,
818        },
819    },
820    'beds_assigned': {
821        'type': 'CPS Int Field',
822        'data': {
823            'is_searchabletext': False,
824        },
825    },
826    'beds_assigned_list': {
827        'type': 'CPS String List Field',
828        'data': {
829            'is_searchabletext': False,
830        },
831    },
832}###)
833
834##scratch_card = { ###(
835####   'allow_discussion': {
836####        'type': 'CPS Int Field',
837####        'data': {
838####            'default_expr': 'python:0',
839####            'is_searchabletext': 0,
840####            },
841####        },
842##     'sc_id': {
843##        'type': 'CPS String Field',
844##        'data': {
845##            'default_expr': '',
846##            'is_searchabletext': 0,
847##            'acl_read_permissions': '',
848##            'acl_read_roles': '',
849##            'acl_read_expr': '',
850##            'acl_write_permissions': '',
851##            'acl_write_roles': '',
852##            'acl_write_expr': '',
853##            'read_ignore_storage': False,
854##            'read_process_expr': '',
855##            'read_process_dependent_fields': (),
856##            'write_ignore_storage': False,
857##            'write_process_expr': '',
858##        },
859##    },
860##     'sc_pin': {
861##        'type': 'CPS String Field',
862##        'data': {
863##            'default_expr': '',
864##            'is_searchabletext': 0,
865##            'acl_read_permissions': '',
866##            'acl_read_roles': '',
867##            'acl_read_expr': '',
868##            'acl_write_permissions': '',
869##            'acl_write_roles': '',
870##            'acl_write_expr': '',
871##            'read_ignore_storage': False,
872##            'read_process_expr': '',
873##            'read_process_dependent_fields': (),
874##            'write_ignore_storage': False,
875##            'write_process_expr': '',
876##        },
877##    },
878##}
879###)
880
881schemas = {}
882
883schemas['university'] = university_schema
884schemas['academics'] = academics_folder_schema
885schemas['students'] = students_folder_schema
886schemas['student'] = student_schema
887schemas['student_admission'] = student_admission
888schemas['student_clearance'] = student_clearance
889schemas['student_documents'] = student_documents
890schemas['student_eligibility'] = student_eligibility
891schemas['student_accommodation'] = student_accommodation
892schemas['student_hostel_fee'] = student_hostel_fee
893schemas['study_level'] = study_level
894schemas['course_results'] = course_results_schema
895schemas['student_personal'] = student_personal_schema
896schemas['accommodation'] = accommodation
897schemas['jamb'] = jamb_schema
898#schemas['scratch_card'] = scratch_card
899schemas['faculty'] = faculty_schema
900schemas['department'] = department_schema
901schemas['course'] = course_schema
902
903return schemas
Note: See TracBrowser for help on using the repository browser.