source: WAeUP_SRP/branches/srp_benin/__init__.py @ 482

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

Catalog Importer does not reindex portal_catalog if no new columns or
indexes in catalog.xml

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