1 | #-*- mode: python; mode: fold -*- |
---|
2 | # $Id: __init__.py 238 2006-06-01 16:57:18Z joachim $ |
---|
3 | from Products.CMFCore.utils import ContentInit, ToolInit |
---|
4 | from Products.CMFCore.DirectoryView import registerDirectory |
---|
5 | from Products.CMFCore import utils as cmfutils |
---|
6 | from Products.CMFCore.CMFCorePermissions import AddPortalContent |
---|
7 | |
---|
8 | from Products.GenericSetup import profile_registry |
---|
9 | from Products.GenericSetup import EXTENSION |
---|
10 | |
---|
11 | from Products.CPSCore.interfaces import ICPSSite |
---|
12 | |
---|
13 | from Products.WAeUP.University import University, addUniversity |
---|
14 | from Products.WAeUP.Accommodation import AccoFolder, addAccoFolder |
---|
15 | from Products.WAeUP.Accommodation import Accommodation, addAccommodation |
---|
16 | from Products.WAeUP.Academics import SCFolder, addSCFolder |
---|
17 | from Products.WAeUP.Academics import StudyCourse, addStudyCourse |
---|
18 | from Products.WAeUP.Academics import Faculty, addFaculty |
---|
19 | from Products.WAeUP.Academics import Department, addDepartment |
---|
20 | from Products.WAeUP.Academics import Course, addCourse |
---|
21 | from Products.WAeUP.Academics import CourseTicket, addCourseTicket |
---|
22 | from Products.WAeUP.Students import Student, addStudent |
---|
23 | from Products.WAeUP.Students import StudentPersonal, addStudentPersonal |
---|
24 | from Products.WAeUP.Students import StudentEligibility, addStudentEligibility |
---|
25 | from Products.WAeUP.Students import StudentDocuments, addStudentDocuments |
---|
26 | from Products.WAeUP.Students import Jamb, addJamb |
---|
27 | from Products.WAeUP.Students import StudyLevel, addStudyLevel |
---|
28 | from Products.WAeUP.Students import Semester, addSemester |
---|
29 | |
---|
30 | |
---|
31 | import Widgets |
---|
32 | |
---|
33 | contentClasses = ( |
---|
34 | University, |
---|
35 | SCFolder, |
---|
36 | StudyCourse, |
---|
37 | Faculty, |
---|
38 | Department, |
---|
39 | Course, |
---|
40 | CourseTicket, |
---|
41 | AccoFolder, |
---|
42 | Accommodation, |
---|
43 | Student, |
---|
44 | StudentPersonal, |
---|
45 | StudentEligibility, |
---|
46 | StudentDocuments, |
---|
47 | Jamb, |
---|
48 | StudyLevel, |
---|
49 | Semester, |
---|
50 | ) |
---|
51 | |
---|
52 | contentConstructors = ( |
---|
53 | addUniversity, |
---|
54 | addSCFolder, |
---|
55 | addStudyCourse, |
---|
56 | addFaculty, |
---|
57 | addDepartment, |
---|
58 | addCourse, |
---|
59 | addCourseTicket, |
---|
60 | addAccoFolder, |
---|
61 | addAccommodation, |
---|
62 | addStudent, |
---|
63 | addStudentPersonal, |
---|
64 | addStudentEligibility, |
---|
65 | addStudentDocuments, |
---|
66 | addJamb, |
---|
67 | addStudyLevel, |
---|
68 | addSemester, |
---|
69 | ) |
---|
70 | |
---|
71 | fti = ( |
---|
72 | {}, # University |
---|
73 | {}, #SCFolder |
---|
74 | {}, #StudyCourse |
---|
75 | {}, # Faculty |
---|
76 | {}, # Department |
---|
77 | {}, # Course |
---|
78 | {}, # CourseTicket |
---|
79 | {}, # AccoFolder |
---|
80 | {}, # Accommodation |
---|
81 | {}, # Student, |
---|
82 | {}, # StudentPersonal, |
---|
83 | {}, # StudentEligibility, |
---|
84 | {}, # StudentDocuments, |
---|
85 | {}, # Jamb, |
---|
86 | {}, # StudyLevel, |
---|
87 | {}, # Semester, |
---|
88 | ) |
---|
89 | |
---|
90 | registerDirectory('skins', globals()) |
---|
91 | |
---|
92 | def initialize(registrar): |
---|
93 | ContentInit('WAeUP Types', |
---|
94 | content_types = contentClasses, |
---|
95 | permission = AddPortalContent, |
---|
96 | extra_constructors = contentConstructors, |
---|
97 | fti = fti, |
---|
98 | ).initialize(registrar) |
---|
99 | |
---|
100 | # Extension profile registration |
---|
101 | profile_registry.registerProfile( |
---|
102 | 'default', |
---|
103 | 'WAeUP', |
---|
104 | "The WestAfrican e-University Project", |
---|
105 | 'profiles/default', |
---|
106 | 'WAeUP', |
---|
107 | EXTENSION, |
---|
108 | for_=ICPSSite) |
---|
109 | |
---|