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