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

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

=more enhancements

  • Property svn:keywords set to Id
File size: 23.1 KB
Line 
1#-*- mode: python; mode: fold -*-
2# $Id: getWAeUPSchemas.py 166 2005-11-12 14:45:08Z 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    'clearence_sc_id' : sc_id,
161    'clearence_sc_pin' : sc_pin,
162    'clearence_sc_value' : sc_value,
163    'clearence_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_clearence = { ###(
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     'sex': {
418        'type': 'CPS Boolean Field',
419        'default_expr': 'python:True',
420        'data': {
421            'is_searchabletext': 1,
422        },
423    },
424     'birthday': {
425        'type': 'CPS DateTime Field',
426        'data': {
427            'is_searchabletext': 1,
428        },
429    },
430     'age': {
431        'type': 'CPS DateTime Field',
432        'data': {
433            'is_searchabletext': 1,
434        },
435    },
436}
437###)
438
439student_documents = { ###(
440     'photo': {
441        'type': 'CPS Image Field',
442        'data': {
443            'is_searchabletext': 0,
444        },
445    },
446     'birth_certificate': {
447        'type': 'CPS Image Field',
448        'data': {
449            'is_searchabletext': 0,
450        },
451    },
452     'passport': {
453        'type': 'CPS Image Field',
454        'data': {
455            'is_searchabletext': 0,
456        },
457    },
458     'results_first': {
459        'type': 'CPS Image Field',
460        'data': {
461            'is_searchabletext': 0,
462        },
463    },
464     'results_second': {
465        'type': 'CPS Image Field',
466        'data': {
467            'is_searchabletext': 0,
468        },
469    },
470}
471###)
472
473student_eligibility = { ###(
474     'firstname': {
475        'type': 'CPS String Field',
476        'data': {
477            'is_searchabletext': 1,
478        },
479    },
480    'middlename': {
481        'type': 'CPS String Field',
482        'data': {
483            'is_searchabletext': 1,
484        },
485    },
486     'lastname': {
487        'type': 'CPS String Field',
488        'data': {
489            'is_searchabletext': 1,
490        },
491    },
492     'sex': {
493        'type': 'CPS Boolean Field',
494        'default_expr': 'python:True',
495        'data': {
496            'is_searchabletext': 0,
497        },
498    },
499##     'birthday': {
500##        'type': 'CPS DateTime Field',
501##        'data': {
502##            'is_searchabletext': 1,
503##        },
504##    },
505     'age': {
506        'type': 'CPS DateTime Field',
507        'data': {
508            'is_searchabletext': 0,
509        },
510    },
511    'email': {
512        'type': 'CPS String Field',
513        'data': {
514            'is_searchabletext': 1,
515        },
516    },
517    'pw': {
518        'type': 'CPS String Field',
519        'data': {
520            'default_expr': 'string:default',
521        },
522    },
523    'rpw': {
524        'type': 'CPS String Field',
525        'data': {
526            'default_expr': 'string:default',
527        },
528    },
529##     'photo': {
530##        'type': 'CPS Image Field',
531##        'data': {
532##            'is_searchabletext': 0,
533##        },
534##    },
535##     'birth_certificate': {
536##        'type': 'CPS Image Field',
537##        'data': {
538##            'is_searchabletext': 0,
539##        },
540##    },
541}
542###)
543
544jamb_schema = { ###(
545    'reg_nr': {
546        'type': 'CPS String Field',
547        'data': {
548            'default_expr': 'string:',
549            'is_searchabletext': True,
550        },
551    },
552    'admission_sc_id': {
553        'type': 'CPS String Field',
554        'data': {
555            'is_searchabletext': True,
556        },
557    },
558    'admission_sc_pin': {
559        'type': 'CPS String Field',
560        'data': {
561            'is_searchabletext': True,
562        },
563    },
564    'admission_sc_pin_usage': {
565        'type': 'CPS Int Field',
566        'data': {
567            'default_expr': 'python:0',
568            'is_searchabletext': False,
569            },
570    },
571     'firstname': {
572        'type': 'CPS String Field',
573        'data': {
574            'is_searchabletext': 1,
575        },
576    },
577    'middlename': {
578        'type': 'CPS String Field',
579        'data': {
580            'is_searchabletext': 1,
581        },
582    },
583     'lastname': {
584        'type': 'CPS String Field',
585        'data': {
586            'is_searchabletext': 1,
587        },
588    },
589    'age': {
590        'type': 'CPS Int Field',
591        'data': {
592            'default_expr': 'python:20',
593            'is_searchabletext': False,
594        },
595    },
596    'sex': {
597        'type': 'CPS Boolean Field',
598        'data': {
599            'default_expr': 'python:0',
600            'is_searchabletext': False,
601        },
602    },
603    'state': {
604        'type': 'CPS String Field',
605        'data': {
606            'default_expr': 'string:',
607            'is_searchabletext': False,
608        },
609    },
610    'exam_results': {
611        'type': 'CPS String Field',
612        'data': {
613            'default_expr': 'string:',
614        },
615    },
616    'aggregate': {
617        'type': 'CPS String Field',
618        'data': {
619            'default_expr': 'string:',
620            'is_searchabletext': False,
621        },
622    },
623    'faculty': {
624        'type': 'CPS String Field',
625        'data': {
626            'default_expr': 'string:',
627            'is_searchabletext': False,
628        },
629    },
630    'course': {
631        'type': 'CPS String Field',
632        'data': {
633            'default_expr': 'string:',
634            'is_searchabletext': False,
635        },
636    },
637    'listing_date': {
638        'type': 'CPS DateTime Field',
639        'data': {
640            'is_searchabletext': False,
641        },
642    },
643##    '2nd_choice': { ###(
644##        'type': 'CPS String Field',
645##        'data': {
646##            'default_expr': 'string:',
647##            'is_searchabletext': False,
648##            'acl_read_permissions': '',
649##            'acl_read_roles': '',
650##            'acl_read_expr': '',
651##            'acl_write_permissions': '',
652##            'acl_write_roles': '',
653##            'acl_write_expr': '',
654##            'read_ignore_storage': False,
655##            'read_process_expr': '',
656##            'read_process_dependent_fields': (),
657##            'write_ignore_storage': False,
658##            'write_process_expr': '',
659##        },
660##    },
661##    '3rd_choice': {
662##        'type': 'CPS String Field',
663##        'data': {
664##            'default_expr': 'string:',
665##            'is_searchabletext': True,
666##            'acl_read_permissions': '',
667##            'acl_read_roles': '',
668##            'acl_read_expr': '',
669##            'acl_write_permissions': '',
670##            'acl_write_roles': '',
671##            'acl_write_expr': '',
672##            'read_ignore_storage': False,
673##            'read_process_expr': '',
674##            'read_process_dependent_fields': (),
675##            'write_ignore_storage': False,
676##            'write_process_expr': '',
677##        },
678##    },
679###)
680}
681
682
683###)
684
685course_results_schema = { ###(
686     'points': {
687        'type': 'CPS Int Field',
688        'data': {
689            'is_searchabletext': 0,
690        },
691    },
692     'grade': {
693        'type': 'CPS String Field',
694        'data': {
695            'is_searchabletext': 0,
696        },
697    },
698}
699#
700###)
701
702faculty_schema = { ###(
703}###)
704
705department_schema = { ###(
706}###)
707
708course_schema = { ###(
709##    'Title': {
710##        'type': 'CPS String Field',
711##        'data': {
712##            'default_expr': '',
713##            'is_searchabletext': True,
714##        },
715##    },
716    'heading': {
717        'type': 'CPS String Field',
718        'data': {
719            'is_searchabletext': True,
720        },
721    },
722    'text': {
723        'type': 'CPS String Field',
724        'data': {
725            'is_searchabletext': True,
726        },
727    },
728    'level': {
729        'type': 'CPS String Field',
730        'data': {
731            'default_expr': 'string:',
732            'is_searchabletext': True,
733        },
734    },
735    'code': {
736        'type': 'CPS String Field',
737        'data': {
738            'default_expr': 'string:',
739            'is_searchabletext': True,
740        },
741    },
742    'semester': {
743        'type': 'CPS Boolean Field',
744        'data': {
745            'default_expr': 'python:True',
746            'is_searchabletext': False,
747        },
748    },
749    'credit': {
750        'type': 'CPS Int Field',
751        'data': {
752            'default_expr': 'string:',
753            'is_searchabletext': False,
754        },
755    },
756    'core_elective': {
757        'type': 'CPS Boolean Field',
758        'data': {
759            'default_expr': 'python:True',
760            'is_searchabletext': False,
761        },
762    },
763}###)
764
765accommodation = { ###(
766    'heading': {
767        'type': 'CPS String Field',
768        'data': {
769            'is_searchabletext': True,
770        },
771    },
772    'text': {
773        'type': 'CPS String Field',
774        'data': {
775            'is_searchabletext': True,
776        },
777    },
778    'which_sex': {
779        'type': 'CPS Boolean Field',
780        'data': {
781            'is_searchabletext': True,
782        },
783    },
784    'nr_of_blocks': {
785        'type': 'CPS Int Field',
786        'data': {
787            'is_searchabletext': False,
788        },
789    },
790    'nr_of_floors': {
791        'type': 'CPS Int Field',
792        'data': {
793            'is_searchabletext': False,
794        },
795    },
796    'rooms_per_floor': {
797        'type': 'CPS Int Field',
798        'data': {
799            'is_searchabletext': False,
800        },
801    },
802    'beds_per_room': {
803        'type': 'CPS Int Field',
804        'data': {
805            'is_searchabletext': False,
806        },
807    },
808    'beds_assigned': {
809        'type': 'CPS Int Field',
810        'data': {
811            'is_searchabletext': False,
812        },
813    },
814    'beds_assigned_list': {
815        'type': 'CPS String List Field',
816        'data': {
817            'is_searchabletext': False,
818        },
819    },
820}###)
821
822##scratch_card = { ###(
823####   'allow_discussion': {
824####        'type': 'CPS Int Field',
825####        'data': {
826####            'default_expr': 'python:0',
827####            'is_searchabletext': 0,
828####            },
829####        },
830##     'sc_id': {
831##        'type': 'CPS String Field',
832##        'data': {
833##            'default_expr': '',
834##            'is_searchabletext': 0,
835##            'acl_read_permissions': '',
836##            'acl_read_roles': '',
837##            'acl_read_expr': '',
838##            'acl_write_permissions': '',
839##            'acl_write_roles': '',
840##            'acl_write_expr': '',
841##            'read_ignore_storage': False,
842##            'read_process_expr': '',
843##            'read_process_dependent_fields': (),
844##            'write_ignore_storage': False,
845##            'write_process_expr': '',
846##        },
847##    },
848##     'sc_pin': {
849##        'type': 'CPS String Field',
850##        'data': {
851##            'default_expr': '',
852##            'is_searchabletext': 0,
853##            'acl_read_permissions': '',
854##            'acl_read_roles': '',
855##            'acl_read_expr': '',
856##            'acl_write_permissions': '',
857##            'acl_write_roles': '',
858##            'acl_write_expr': '',
859##            'read_ignore_storage': False,
860##            'read_process_expr': '',
861##            'read_process_dependent_fields': (),
862##            'write_ignore_storage': False,
863##            'write_process_expr': '',
864##        },
865##    },
866##}
867schemas = {}
868###)
869
870schemas['university'] = university_schema
871schemas['academics'] = academics_folder_schema
872schemas['students'] = students_folder_schema
873schemas['student'] = student_schema
874schemas['student_admission'] = student_admission
875schemas['student_clearence'] = student_clearence
876schemas['student_documents'] = student_documents
877schemas['student_eligibility'] = student_eligibility
878schemas['student_accommodation'] = student_accommodation
879schemas['student_hostel_fee'] = student_hostel_fee
880schemas['study_level'] = study_level
881schemas['course_results'] = course_results_schema
882schemas['student_personal'] = student_personal_schema
883schemas['accommodation'] = accommodation
884schemas['jamb'] = jamb_schema
885#schemas['scratch_card'] = scratch_card
886schemas['faculty'] = faculty_schema
887schemas['department'] = department_schema
888schemas['course'] = course_schema
889
890return schemas
Note: See TracBrowser for help on using the repository browser.