[199] | 1 | #-*- mode: python; mode: fold -*- |
---|
[204] | 2 | # $Id: __init__.py 238 2006-06-01 16:57:18Z joachim $ |
---|
[206] | 3 | from Products.CMFCore.utils import ContentInit, ToolInit |
---|
[19] | 4 | from Products.CMFCore.DirectoryView import registerDirectory |
---|
| 5 | from Products.CMFCore import utils as cmfutils |
---|
| 6 | from Products.CMFCore.CMFCorePermissions import AddPortalContent |
---|
| 7 | |
---|
[199] | 8 | from Products.GenericSetup import profile_registry |
---|
| 9 | from Products.GenericSetup import EXTENSION |
---|
[19] | 10 | |
---|
[199] | 11 | from Products.CPSCore.interfaces import ICPSSite |
---|
| 12 | |
---|
[200] | 13 | from Products.WAeUP.University import University, addUniversity |
---|
| 14 | from Products.WAeUP.Accommodation import AccoFolder, addAccoFolder |
---|
| 15 | from Products.WAeUP.Accommodation import Accommodation, addAccommodation |
---|
[238] | 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 |
---|
[200] | 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 | |
---|
[59] | 31 | import Widgets |
---|
[19] | 32 | |
---|
[200] | 33 | contentClasses = ( |
---|
| 34 | University, |
---|
[238] | 35 | SCFolder, |
---|
| 36 | StudyCourse, |
---|
[200] | 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, |
---|
[238] | 54 | addSCFolder, |
---|
| 55 | addStudyCourse, |
---|
[200] | 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 |
---|
[238] | 73 | {}, #SCFolder |
---|
| 74 | {}, #StudyCourse |
---|
[200] | 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 | |
---|
[199] | 90 | registerDirectory('skins', globals()) |
---|
[197] | 91 | |
---|
[199] | 92 | def initialize(registrar): |
---|
[200] | 93 | ContentInit('WAeUP Types', |
---|
| 94 | content_types = contentClasses, |
---|
| 95 | permission = AddPortalContent, |
---|
| 96 | extra_constructors = contentConstructors, |
---|
| 97 | fti = fti, |
---|
| 98 | ).initialize(registrar) |
---|
| 99 | |
---|
[199] | 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) |
---|
[84] | 109 | |
---|