source: WAeUP_SRP/trunk/__init__.py @ 427

Last change on this file since 427 was 423, checked in by joachim, 18 years ago

addopted studentimport to new schemas,

  • Property svn:keywords set to Id
File size: 4.0 KB
Line 
1#-*- mode: python; mode: fold -*-
2# $Id: __init__.py 423 2006-08-25 17:19:21Z 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 StudentAdmission, addStudentAdmission
32from Products.WAeUP_SRP.Students import StudentClearance, addStudentClearance
33from Products.WAeUP_SRP.Students import StudentPersonal, addStudentPersonal
34from Products.WAeUP_SRP.Students import StudentDocuments, addStudentDocuments
35from Products.WAeUP_SRP.Students import Jamb, addJamb
36from Products.WAeUP_SRP.Students import StudyLevel, addStudyLevel
37from Products.WAeUP_SRP.Students import Semester, addSemester
38
39
40import Widgets
41
42contentClasses = (
43    University,
44    AcademicsFolder,
45    Certificate,
46    CertificateCourse,
47    Faculty,
48    Department,
49    Course,
50    CourseTicket,
51    CertificateCourse,
52    AccoFolder,
53    Accommodation,
54    StudentsFolder,
55    Student,
56    StudentStudyCourse,
57    StudentAdmission,
58    StudentClearance,
59    StudentPersonal,
60    StudentDocuments,
61    Jamb,
62    StudyLevel,
63    Semester,
64    )
65
66contentConstructors = (
67    addUniversity,
68    addAcademicsFolder,
69    addCertificate,
70    addCertificateCourse,
71    addFaculty,
72    addDepartment,
73    addCourse,
74    addCourseTicket,
75    addCertificateCourse,
76    addAccoFolder,
77    addAccommodation,
78    addStudentsFolder,
79    addStudent,
80    addStudentStudyCourse,
81    addStudentAdmission,
82    addStudentClearance,
83    addStudentPersonal,
84    addStudentDocuments,
85    addJamb,
86    addStudyLevel,
87    addSemester,
88    )
89
90fti = (
91    {}, # University
92    {}, #AcademicsFolder
93    {}, #Certificate
94    {}, #CertificateCourse
95    {}, # Faculty
96    {}, # Department
97    {}, # Course
98    {}, # CourseTicket
99    {}, # CertificateCourse
100    {}, # AccoFolder
101    {}, # Accommodation
102    {}, # StudentsFolder,
103    {}, # Student,
104    {}, # StudentStudyCourse,
105    {}, # StudentAdmission,
106    {}, # StudentClearance,
107    {}, # StudentAdmission,
108    {}, # StudentClearance,
109    {}, # StudentPersonal,
110    {}, # StudentDocuments,
111    {}, # Jamb,
112    {}, # StudyLevel,
113    {}, # Semester,
114    )
115
116registerDirectory('skins', globals())
117
118def initialize(registrar):
119    ContentInit('WAeUP Types',
120                content_types = contentClasses,
121                permission = AddPortalContent,
122                extra_constructors = contentConstructors,
123                fti = fti,
124                ).initialize(registrar)
125
126    # Extension profile registration
127    profile_registry.registerProfile(
128        'default',
129        'WAeUP_SRP',
130        "The WestAfrican e-University Project",
131        'profiles/default',
132        'WAeUP_SRP',
133        EXTENSION,
134        for_=ICPSSite)
135
Note: See TracBrowser for help on using the repository browser.