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

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

=fixed Title bug in Course and Hall

  • Property svn:keywords set to Id
File size: 12.3 KB
Line 
1#-*- mode: python; mode: fold -*-
2# $Id: getWAeUPSchemas.py 144 2005-11-03 08:41: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            'is_searchabletext': True,
334        },
335    },
336    'text': {
337        'type': 'CPS String Field',
338        'data': {
339            'is_searchabletext': True,
340        },
341    },
342    'level': {
343        'type': 'CPS String Field',
344        'data': {
345            'default_expr': 'string:',
346            'is_searchabletext': True,
347        },
348    },
349    'code': {
350        'type': 'CPS String Field',
351        'data': {
352            'default_expr': 'string:',
353            'is_searchabletext': True,
354        },
355    },
356    'semester': {
357        'type': 'CPS Boolean Field',
358        'data': {
359            'default_expr': 'python:True',
360            'is_searchabletext': False,
361        },
362    },
363    'credit': {
364        'type': 'CPS Int Field',
365        'data': {
366            'default_expr': 'string:',
367            'is_searchabletext': False,
368        },
369    },
370    'core_elective': {
371        'type': 'CPS Boolean Field',
372        'data': {
373            'default_expr': 'python:True',
374            'is_searchabletext': False,
375        },
376    },
377}###)
378
379accommodation = { ###(
380    'heading': {
381        'type': 'CPS String Field',
382        'data': {
383            'is_searchabletext': True,
384        },
385    },
386    'text': {
387        'type': 'CPS String Field',
388        'data': {
389            'is_searchabletext': True,
390        },
391    },
392    'which_sex': {
393        'type': 'CPS Boolean Field',
394        'data': {
395            'is_searchabletext': True,
396        },
397    },
398    'nr_of_blocks': {
399        'type': 'CPS Int Field',
400        'data': {
401            'is_searchabletext': False,
402        },
403    },
404    'nr_of_floors': {
405        'type': 'CPS Int Field',
406        'data': {
407            'is_searchabletext': False,
408        },
409    },
410    'rooms_per_floor': {
411        'type': 'CPS Int Field',
412        'data': {
413            'is_searchabletext': False,
414        },
415    },
416    'beds_per_room': {
417        'type': 'CPS Int Field',
418        'data': {
419            'is_searchabletext': False,
420        },
421    },
422    'beds_assigned': {
423        'type': 'CPS Int Field',
424        'data': {
425            'is_searchabletext': False,
426        },
427    },
428    'beds_assigned_list': {
429        'type': 'CPS String List Field',
430        'data': {
431            'is_searchabletext': False,
432        },
433    },
434}###)
435
436##scratch_card = { ###(
437####   'allow_discussion': {
438####        'type': 'CPS Int Field',
439####        'data': {
440####            'default_expr': 'python:0',
441####            'is_searchabletext': 0,
442####            },
443####        },
444##     'sc_id': {
445##        'type': 'CPS String Field',
446##        'data': {
447##            'default_expr': '',
448##            'is_searchabletext': 0,
449##            'acl_read_permissions': '',
450##            'acl_read_roles': '',
451##            'acl_read_expr': '',
452##            'acl_write_permissions': '',
453##            'acl_write_roles': '',
454##            'acl_write_expr': '',
455##            'read_ignore_storage': False,
456##            'read_process_expr': '',
457##            'read_process_dependent_fields': (),
458##            'write_ignore_storage': False,
459##            'write_process_expr': '',
460##        },
461##    },
462##     'sc_pin': {
463##        'type': 'CPS String Field',
464##        'data': {
465##            'default_expr': '',
466##            'is_searchabletext': 0,
467##            'acl_read_permissions': '',
468##            'acl_read_roles': '',
469##            'acl_read_expr': '',
470##            'acl_write_permissions': '',
471##            'acl_write_roles': '',
472##            'acl_write_expr': '',
473##            'read_ignore_storage': False,
474##            'read_process_expr': '',
475##            'read_process_dependent_fields': (),
476##            'write_ignore_storage': False,
477##            'write_process_expr': '',
478##        },
479##    },
480##}
481schemas = {}
482###)
483
484schemas['university'] = university_schema
485schemas['academics'] = academics_folder_schema
486schemas['students'] = students_folder_schema
487schemas['student'] = student_schema
488schemas['course_results'] = course_results_schema
489schemas['student_personal'] = student_personal_schema
490schemas['accommodation'] = accommodation
491schemas['jamb'] = jamb_schema
492#schemas['scratch_card'] = scratch_card
493schemas['faculty'] = faculty_schema
494schemas['department'] = department_schema
495schemas['course'] = course_schema
496
497return schemas
Note: See TracBrowser for help on using the repository browser.