source: WAeUP_SRP/trunk/__init__.py @ 278

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

=import data added

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