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

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

=added register_level

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