source: WAeUP_SRP/trunk/__init__.py @ 411

Last change on this file since 411 was 362, checked in by joachim, 18 years ago

more us changes

  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1#-*- mode: python; mode: fold -*-
2# $Id: __init__.py 362 2006-08-05 18:24:53Z joachim $
3from Products.CMFCore.utils import ContentInit, ToolInit
4from Products.CMFCore.DirectoryView import registerDirectory
5from Products.CMFCore import utils as cmfutils
6from Products.CMFCore.CMFCorePermissions import AddPortalContent
7
8from Products.GenericSetup import profile_registry
9from Products.GenericSetup import EXTENSION
10
11from Products.CPSCore.interfaces import ICPSSite
12
13# Only for CPS 3.4.1. In 3.4.2 and later this should be fixed.
14import PatchCPSDefaultImportExport
15
16import Products.WAeUP_SRP.WAeUPPermissions
17from Products.WAeUP_SRP.Academics import AcademicsFolder, addAcademicsFolder
18from Products.WAeUP_SRP.University import University, addUniversity
19from Products.WAeUP_SRP.Accommodation import AccoFolder, addAccoFolder
20from Products.WAeUP_SRP.Accommodation import Accommodation, addAccommodation
21from Products.WAeUP_SRP.Academics import Certificate, addCertificate
22from Products.WAeUP_SRP.Academics import CertificateCourse, addCertificateCourse
23from Products.WAeUP_SRP.Academics import Faculty, addFaculty
24from Products.WAeUP_SRP.Academics import Department, addDepartment
25from Products.WAeUP_SRP.Academics import Course, addCourse
26from Products.WAeUP_SRP.Academics import CourseTicket, addCourseTicket
27from Products.WAeUP_SRP.Academics import CertificateCourse, addCertificateCourse
28from Products.WAeUP_SRP.Students import StudentsFolder, addStudentsFolder
29from Products.WAeUP_SRP.Students import Student, addStudent
30from Products.WAeUP_SRP.Students import StudentStudyCourse, addStudentStudyCourse
31from Products.WAeUP_SRP.Students import StudentPersonal, addStudentPersonal
32from Products.WAeUP_SRP.Students import StudentEligibility, addStudentEligibility
33from Products.WAeUP_SRP.Students import StudentDocuments, addStudentDocuments
34from Products.WAeUP_SRP.Students import Jamb, addJamb
35from Products.WAeUP_SRP.Students import StudyLevel, addStudyLevel
36from Products.WAeUP_SRP.Students import Semester, addSemester
37
38
39import Widgets
40
41contentClasses = (
42    University,
43    AcademicsFolder,
44    Certificate,
45    CertificateCourse,
46    Faculty,
47    Department,
48    Course,
49    CourseTicket,
50    CertificateCourse,
51    AccoFolder,
52    Accommodation,
53    StudentsFolder,
54    Student,
55    StudentStudyCourse,
56    StudentPersonal,
57    StudentEligibility,
58    StudentDocuments,
59    Jamb,
60    StudyLevel,
61    Semester,
62    )
63
64contentConstructors = (
65    addUniversity,
66    addAcademicsFolder,
67    addCertificate,
68    addCertificateCourse,
69    addFaculty,
70    addDepartment,
71    addCourse,
72    addCourseTicket,
73    addCertificateCourse,
74    addAccoFolder,
75    addAccommodation,
76    addStudentsFolder,
77    addStudent,
78    addStudentStudyCourse,
79    addStudentPersonal,
80    addStudentEligibility,
81    addStudentDocuments,
82    addJamb,
83    addStudyLevel,
84    addSemester,
85    )
86
87fti = (
88    {}, # University
89    {}, #AcademicsFolder
90    {}, #Certificate
91    {}, #CertificateCourse
92    {}, # Faculty
93    {}, # Department
94    {}, # Course
95    {}, # CourseTicket
96    {}, # CertificateCourse
97    {}, # AccoFolder
98    {}, # Accommodation
99    {}, # StudentsFolder,
100    {}, # Student,
101    {}, # StudentStudyCourse,
102    {}, # StudentPersonal,
103    {}, # StudentEligibility,
104    {}, # StudentDocuments,
105    {}, # Jamb,
106    {}, # StudyLevel,
107    {}, # Semester,
108    )
109
110registerDirectory('skins', globals())
111
112def initialize(registrar):
113    ContentInit('WAeUP Types',
114                content_types = contentClasses,
115                permission = AddPortalContent,
116                extra_constructors = contentConstructors,
117                fti = fti,
118                ).initialize(registrar)
119
120    # Extension profile registration
121    profile_registry.registerProfile(
122        'default',
123        'WAeUP_SRP',
124        "The WestAfrican e-University Project",
125        'profiles/default',
126        'WAeUP_SRP',
127        EXTENSION,
128        for_=ICPSSite)
129
Note: See TracBrowser for help on using the repository browser.