[199] | 1 | #-*- mode: python; mode: fold -*- |
---|
[204] | 2 | # $Id: __init__.py 206 2006-05-18 13:48:21Z 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 |
---|
| 16 | from Products.WAeUP.Faculty import Faculty, addFaculty |
---|
| 17 | from Products.WAeUP.Faculty import Department, addDepartment |
---|
| 18 | from Products.WAeUP.Faculty import Course, addCourse |
---|
| 19 | from Products.WAeUP.Faculty import CourseTicket, addCourseTicket |
---|
| 20 | from Products.WAeUP.Students import Student, addStudent |
---|
| 21 | from Products.WAeUP.Students import StudentPersonal, addStudentPersonal |
---|
| 22 | from Products.WAeUP.Students import StudentEligibility, addStudentEligibility |
---|
| 23 | from Products.WAeUP.Students import StudentDocuments, addStudentDocuments |
---|
| 24 | from Products.WAeUP.Students import Jamb, addJamb |
---|
| 25 | from Products.WAeUP.Students import StudyLevel, addStudyLevel |
---|
| 26 | from Products.WAeUP.Students import Semester, addSemester |
---|
| 27 | |
---|
| 28 | |
---|
[59] | 29 | import Widgets |
---|
[19] | 30 | |
---|
[200] | 31 | contentClasses = ( |
---|
| 32 | University, |
---|
| 33 | Faculty, |
---|
| 34 | Department, |
---|
| 35 | Course, |
---|
| 36 | CourseTicket, |
---|
| 37 | AccoFolder, |
---|
| 38 | Accommodation, |
---|
| 39 | Student, |
---|
| 40 | StudentPersonal, |
---|
| 41 | StudentEligibility, |
---|
| 42 | StudentDocuments, |
---|
| 43 | Jamb, |
---|
| 44 | StudyLevel, |
---|
| 45 | Semester, |
---|
| 46 | ) |
---|
| 47 | |
---|
| 48 | contentConstructors = ( |
---|
| 49 | addUniversity, |
---|
| 50 | addFaculty, |
---|
| 51 | addDepartment, |
---|
| 52 | addCourse, |
---|
| 53 | addCourseTicket, |
---|
| 54 | addAccoFolder, |
---|
| 55 | addAccommodation, |
---|
| 56 | addStudent, |
---|
| 57 | addStudentPersonal, |
---|
| 58 | addStudentEligibility, |
---|
| 59 | addStudentDocuments, |
---|
| 60 | addJamb, |
---|
| 61 | addStudyLevel, |
---|
| 62 | addSemester, |
---|
| 63 | ) |
---|
| 64 | |
---|
| 65 | fti = ( |
---|
| 66 | {}, # University |
---|
| 67 | {}, # Faculty |
---|
| 68 | {}, # Department |
---|
| 69 | {}, # Course |
---|
| 70 | {}, # CourseTicket |
---|
| 71 | {}, # AccoFolder |
---|
| 72 | {}, # Accommodation |
---|
| 73 | {}, # Student, |
---|
| 74 | {}, # StudentPersonal, |
---|
| 75 | {}, # StudentEligibility, |
---|
| 76 | {}, # StudentDocuments, |
---|
| 77 | {}, # Jamb, |
---|
| 78 | {}, # StudyLevel, |
---|
| 79 | {}, # Semester, |
---|
| 80 | ) |
---|
| 81 | |
---|
[199] | 82 | registerDirectory('skins', globals()) |
---|
[197] | 83 | |
---|
[199] | 84 | def initialize(registrar): |
---|
[200] | 85 | ContentInit('WAeUP Types', |
---|
| 86 | content_types = contentClasses, |
---|
| 87 | permission = AddPortalContent, |
---|
| 88 | extra_constructors = contentConstructors, |
---|
| 89 | fti = fti, |
---|
| 90 | ).initialize(registrar) |
---|
| 91 | |
---|
[199] | 92 | # Extension profile registration |
---|
| 93 | profile_registry.registerProfile( |
---|
| 94 | 'default', |
---|
| 95 | 'WAeUP', |
---|
| 96 | "The WestAfrican e-University Project", |
---|
| 97 | 'profiles/default', |
---|
| 98 | 'WAeUP', |
---|
| 99 | EXTENSION, |
---|
| 100 | for_=ICPSSite) |
---|
[84] | 101 | |
---|